diff options
| -rw-r--r-- | gamemode/npcsystem/npcs/bird.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gamemode/npcsystem/npcs/bird.lua b/gamemode/npcsystem/npcs/bird.lua index 0393532..fa3ad8d 100644 --- a/gamemode/npcsystem/npcs/bird.lua +++ b/gamemode/npcsystem/npcs/bird.lua @@ -58,7 +58,7 @@ function NPC:Behave() --Keep flying away as long as we're being chased
while((dist < fardist and not iscrouched) or (dist < closedist)) do
self:StartActivity(ACT_FLY)
- self:SetSequence( "Fly01" )
+ self:PlaySequenceAndWait( "Fly01" )
--Find a position in roughly the oposite direction of the player
local tpos = self:GetPos()
@@ -76,12 +76,16 @@ function NPC:Behave() end
--]]
local navarea = navmesh.GetNavArea(self:GetPos(), 100)
+
if navarea:IsValid() then
+ --print("Looks like nav area is valid")
self:MoveToPos(topos)
else
+ --print("Looks like nav area is invalid")
self:BecomeRagdoll(DamageInfo())
end
- --
+
+
--Check to see if we're being chased
iscrouched = v:Crouching()
|
