fix(Core/ThreatMgr): Remove temp threat on resetting threat list (#18162)
This commit is contained in:
@@ -654,8 +654,12 @@ void ThreatMgr::ResetAllThreat()
|
|||||||
if (threatList.empty())
|
if (threatList.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (ThreatContainer::StorageType::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
for (HostileReference* ref : threatList)
|
||||||
(*itr)->SetThreat(0);
|
{
|
||||||
|
// Reset temp threat before setting threat back to 0.
|
||||||
|
ref->resetTempThreat();
|
||||||
|
ref->SetThreat(0.f);
|
||||||
|
}
|
||||||
|
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user