aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/npcs/antlion1.lua
diff options
context:
space:
mode:
authorAlexander Pickering <Alexander.Pickering@anondomain.site90.net>2016-03-07 18:44:21 -0500
committerAlexander Pickering <Alexander.Pickering@anondomain.site90.net>2016-03-07 18:44:21 -0500
commit4d9d034503dac45eea6da1e32da7fa8b2e97ea6a (patch)
treef815372ab17f9aa17b60a2a597d3a43b837c0c33 /gamemode/npcsystem/npcs/antlion1.lua
parent10ef2a646da0b67d5c1baaed9ac4b0b17a800a98 (diff)
downloadwintersurvival2-4d9d034503dac45eea6da1e32da7fa8b2e97ea6a.tar.gz
wintersurvival2-4d9d034503dac45eea6da1e32da7fa8b2e97ea6a.tar.bz2
wintersurvival2-4d9d034503dac45eea6da1e32da7fa8b2e97ea6a.zip
Fixed npc's bugging out (hopefully)
Diffstat (limited to 'gamemode/npcsystem/npcs/antlion1.lua')
-rw-r--r--gamemode/npcsystem/npcs/antlion1.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/gamemode/npcsystem/npcs/antlion1.lua b/gamemode/npcsystem/npcs/antlion1.lua
index d772603..c9ae1b6 100644
--- a/gamemode/npcsystem/npcs/antlion1.lua
+++ b/gamemode/npcsystem/npcs/antlion1.lua
@@ -87,7 +87,7 @@ NPC.Attacks = {
--Attack priority is a fucntion that takes a player, and returns an int describing it's prority to attack (higher = more important) NPC will always attack the player with the highest priority
function NPC:AttackPriority(ply)
- if not ply then return 0 end
+ if not ply or not ply:IsValid() then return 0 end
local plypos = ply:GetPos()
local mypos = self:GetPos()
if not plypos then return 0 end