aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/aidirector.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/npcsystem/aidirector.lua')
-rw-r--r--gamemode/npcsystem/aidirector.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/gamemode/npcsystem/aidirector.lua b/gamemode/npcsystem/aidirector.lua
index 4051204..f5cf2b4 100644
--- a/gamemode/npcsystem/aidirector.lua
+++ b/gamemode/npcsystem/aidirector.lua
@@ -93,6 +93,8 @@ hook.Add("Tick","SpawnAmbient",function()
if (C != CONTENTS_WATER and C != CONTENTS_WATER+CONTENTS_TRANSLUCENT) then
--print("Appropriate place found, spawning bird)")
local randnpcnum = math.Round(math.Rand(0, #ambientnpcs))
+ local npc = GetNpcByName(ambientnpcs[randnpcnum])
+ if(npc:)
SpawnNpcByName(ambientnpcs[randnpcnum],Pos)
break
end