1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-13 22:06:58 +02:00
This commit is contained in:
DjWarmonger 2013-01-25 14:39:28 +00:00
parent beac6b12d8
commit dcedfb05d2

View File

@ -2428,11 +2428,18 @@ void CPlayerInterface::artifactDisassembled(const ArtifactLocation &al)
void CPlayerInterface::playerStartsTurn(ui8 player)
{
EVENT_HANDLER_CALLED_BY_CLIENT;
if (GH.listInt.empty() || GH.listInt.front() != adventureInt)
if (!vstd::contains (GH.listInt, adventureInt))
{
GH.popInts(GH.listInt.size());
GH.pushInt(adventureInt);
GH.popInts (GH.listInt.size()); //after map load - remove everything else
GH.pushInt (adventureInt);
}
else
{
while (GH.listInt.front() != adventureInt && !dynamic_cast<CInfoWindow*>(GH.listInt.front())) //don't remove dialogs that expect query answer
GH.popInts(1);
}
if(howManyPeople == 1)
{
GH.curInt = this;