mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Fixed crash in battles, when attempted to access <0 screen coordinates.
This commit is contained in:
@@ -5098,7 +5098,7 @@ void CGameHandler::checkLossVictory( PlayerColor player )
|
||||
if(*i && (*i)->tempOwner == player)
|
||||
setOwner(*i,PlayerColor::NEUTRAL);
|
||||
}
|
||||
|
||||
|
||||
//eliminating one player may cause victory of another:
|
||||
winLoseHandle(GameConstants::ALL_PLAYERS & ~(1<<player.getNum()));
|
||||
}
|
||||
@@ -5135,6 +5135,12 @@ void CGameHandler::checkLossVictory( PlayerColor player )
|
||||
sendAndApply(&ucs);
|
||||
}
|
||||
}
|
||||
|
||||
//If player making turn has lost his turn must be over as well
|
||||
if(gs->getPlayer(gs->currentPlayer)->status != EPlayerStatus::INGAME)
|
||||
{
|
||||
states.setFlag(gs->currentPlayer, &PlayerStatus::makingTurn, false);
|
||||
}
|
||||
}
|
||||
|
||||
void CGameHandler::getLossVicMessage( PlayerColor player, si8 standard, bool victory, InfoWindow &out ) const
|
||||
|
||||
Reference in New Issue
Block a user