1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fixed battles for network MP.

This commit is contained in:
Michał W. Urbańczyk
2010-10-30 19:26:39 +00:00
parent 0f36095dc7
commit e83b9fa8fa
2 changed files with 9 additions and 4 deletions

View File

@ -1102,6 +1102,8 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
{
ObjectConstruction h__l__p(this);
if(!curInt) curInt = LOCPLINT; //may happen when we are defending during network MP game
animsAreDisplayed.setn(false);
pos = myRect;
strongInterest = true;
@ -2916,7 +2918,8 @@ void CBattleInterface::activateStack()
stackToActivate = -1;
myTurn = true;
curInt = attackerInt->playerID == LOCPLINT->cb->battleGetStackByID(activeStack)->owner ? attackerInt : defenderInt;
if(attackerInt && defenderInt) //hotseat -> need to pick which interface "takes over" as active
curInt = attackerInt->playerID == LOCPLINT->cb->battleGetStackByID(activeStack)->owner ? attackerInt : defenderInt;
queue->update();
redrawBackgroundWithHexes(activeStack);