Fix crash when player completes a commander order. Credit to @RGreenlees

- The crash possibly only occured in debug mode?
This commit is contained in:
pierow 2023-10-22 23:24:42 -04:00
parent 1748d39d7e
commit 9f324e47b0

View file

@ -2331,7 +2331,7 @@ void AvHTeam::UpdateOrders()
const float kExpireTime = 1.0f;
if(!theOrderIter->GetOrderActive() && (theOrderIter->GetTimeOrderCompleted() != -1) && (gpGlobals->time > (theOrderIter->GetTimeOrderCompleted() + kExpireTime)))
{
this->mOrderList.erase(theOrderIter);
theOrderIter = this->mOrderList.erase(theOrderIter);
}
else
{