diff options
| author | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-02 22:23:17 -0500 |
|---|---|---|
| committer | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-02 22:23:17 -0500 |
| commit | a7a1e3a2d23e4aa10d874ad1b663d2116c1f62cb (patch) | |
| tree | b7827fb1f060a213534bcb0c6c190dbea04c6567 /gamemode/npcsystem/aidirector.lua | |
| parent | f1e99d19a5aa6e5fa61518366235e3da09689d0b (diff) | |
| download | wintersurvival2-a7a1e3a2d23e4aa10d874ad1b663d2116c1f62cb.tar.gz wintersurvival2-a7a1e3a2d23e4aa10d874ad1b663d2116c1f62cb.tar.bz2 wintersurvival2-a7a1e3a2d23e4aa10d874ad1b663d2116c1f62cb.zip | |
More work on ai overhaul
Diffstat (limited to 'gamemode/npcsystem/aidirector.lua')
| -rw-r--r-- | gamemode/npcsystem/aidirector.lua | 2 |
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
|
