Don't investigate your allies
This commit is contained in:
parent
4a3eb4b949
commit
1a38d4590b
|
@ -372,7 +372,12 @@ function ENT:Think()
|
|||
|
||||
if self:GetState() == "combat" then
|
||||
for ent, data in pairs( self.bEnemyMemory ) do
|
||||
if !data.GoToLastKnown and data.LastSeenTime+5 < CurTime() then
|
||||
if !IsValid(ent) then
|
||||
print("wtf")
|
||||
self.bEnemyMemory[ent] = nil
|
||||
continue
|
||||
end
|
||||
if self.Faction != ent.Faction and !data.GoToLastKnown and data.LastSeenTime+5 < CurTime() then
|
||||
data.GoToLastKnown = Vector(data.LastPos)
|
||||
self:DebugChat( "Investigating " .. ent:Nick() .. "'s last known position" )
|
||||
--self:SetState("idle")
|
||||
|
|
Loading…
Reference in New Issue