Don't investigate your allies

This commit is contained in:
Fesiug 2023-12-30 21:18:54 -05:00
parent 4a3eb4b949
commit 1a38d4590b
1 changed files with 6 additions and 1 deletions

View File

@ -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")