aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/npcs/antlion2.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-29 20:42:56 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-29 20:42:56 -0400
commit64571b36f7616ef541eb6a33e7fbd5bfa6bbdde3 (patch)
treecf6feebed99a1da82cbcdb37b6fc84eb273882a8 /gamemode/npcsystem/npcs/antlion2.lua
parentaf7ee9e0e69e4f8f0a09f2795f5cde14e738a8b1 (diff)
downloadwintersurvival2-64571b36f7616ef541eb6a33e7fbd5bfa6bbdde3.tar.gz
wintersurvival2-64571b36f7616ef541eb6a33e7fbd5bfa6bbdde3.tar.bz2
wintersurvival2-64571b36f7616ef541eb6a33e7fbd5bfa6bbdde3.zip
Changed if/then statements in antlions 1 and 2 to asserts
Diffstat (limited to 'gamemode/npcsystem/npcs/antlion2.lua')
-rw-r--r--gamemode/npcsystem/npcs/antlion2.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/gamemode/npcsystem/npcs/antlion2.lua b/gamemode/npcsystem/npcs/antlion2.lua
index 6c16c72..e60e517 100644
--- a/gamemode/npcsystem/npcs/antlion2.lua
+++ b/gamemode/npcsystem/npcs/antlion2.lua
@@ -36,12 +36,8 @@ 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 self == nil then
- print("In antlion2, checkmele called with null self")
- end
- if ply == nil then
- print("In antlion2, checkmele called with null ply")
- 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
return -1
end