fix(Core/ThreatMgr): Remove temp threat on resetting threat list (#18162)
This commit is contained in:
parent
c863a8cfb5
commit
a1891d8d8f
1 changed files with 6 additions and 2 deletions
|
|
@ -654,8 +654,12 @@ void ThreatMgr::ResetAllThreat()
|
|||
if (threatList.empty())
|
||||
return;
|
||||
|
||||
for (ThreatContainer::StorageType::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
(*itr)->SetThreat(0);
|
||||
for (HostileReference* ref : threatList)
|
||||
{
|
||||
// Reset temp threat before setting threat back to 0.
|
||||
ref->resetTempThreat();
|
||||
ref->SetThreat(0.f);
|
||||
}
|
||||
|
||||
setDirty(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue