diff options
Diffstat (limited to 'gamemode/npcsystem/npcs/antlion1.lua')
| -rw-r--r-- | gamemode/npcsystem/npcs/antlion1.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gamemode/npcsystem/npcs/antlion1.lua b/gamemode/npcsystem/npcs/antlion1.lua index 10b9395..5d0bc8e 100644 --- a/gamemode/npcsystem/npcs/antlion1.lua +++ b/gamemode/npcsystem/npcs/antlion1.lua @@ -36,6 +36,7 @@ NPC.IdleSequences = { --Attacks should be formated as [i]={function (return int dammage) canattack(ply) = function doattack(ply)} --NPC will do the most dammage possible per attack local checkmele = function(self, ply) + if (not IsValid(self)) or (not IsValid(ply)) then return -1 end assert(self != nil, "checkmele called on nil npc!") assert(ply != nil, "checkmelecalled for nil player!") if(ply:GetPos():Distance(self:GetPos()) < 100) then return 20 end |
