1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

#1153 and #1395 should be fixed. Terrible, terrible, terrible.

Fixed crash in battles, when attempted to access <0 screen coordinates.
This commit is contained in:
Michał W. Urbańczyk
2013-09-01 22:55:57 +00:00
parent 708b0c6f47
commit 385f4ab7f5
6 changed files with 53 additions and 31 deletions

View File

@@ -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