Fixed UI movement mode not switching to crawl on character collapse, leading to deadlocks (#231)

This commit is contained in:
Andrzej Fałkowski
2023-10-02 19:32:15 +03:00
committed by GitHub
parent a3be3ecd7e
commit 14ec138fc7
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -3214,7 +3214,7 @@ BOOLEAN CheckForMercContMove( SOLDIERTYPE *pSoldier )
return( FALSE );
}
if( pSoldier->stats.bLife >= OKLIFE )
if( pSoldier->stats.bLife >= OKLIFE && !(pSoldier->bCollapsed && pSoldier->bBreath < OKBREATH) )
{
if( pSoldier->sGridNo != pSoldier->pathing.sFinalDestination || pSoldier->bGoodContPath )
{
+2
View File
@@ -21855,6 +21855,8 @@ void SoldierCollapse( SOLDIERTYPE *pSoldier )
pSoldier->bCollapsed = TRUE;
pSoldier->usUIMovementMode = CRAWLING;
pSoldier->ReceivingSoldierCancelServices( );
// CC has requested - handle sight here...