Ignore mercs away on minievents for food status updates (#322)

This commit is contained in:
Asdow
2024-08-11 13:30:49 +03:00
committed by GitHub
parent 2307508a85
commit 3391c6d777
+3 -1
View File
@@ -364,7 +364,9 @@ void ReduceBPRegenForHunger( SOLDIERTYPE *pSoldier, INT32 *psPoints )
void HourlyFoodSituationUpdate( SOLDIERTYPE *pSoldier )
{
if ( !pSoldier )
// A merc away on a minievent assignment is ignored since we cannot control their food or water intake.
// Without this they would end up losing stats and/or dying during long event assignments, which would lead to the game crashing when death occurs.
if ( !pSoldier || pSoldier->bAssignment == ASSIGNMENT_MINIEVENT)
return;
// determine our current activity level