1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* improvements in battle support - moving creatures work though there are small graphic glitches

* @neweagle - I've replaced in VCMI_Lib.h your #ifndef with #ifdef since you modification affected (and broke) compilation only on MSVC. Is it ok now?
This commit is contained in:
Michał W. Urbańczyk
2008-08-04 23:04:15 +00:00
parent 1bd3a677fe
commit a5354271e2
9 changed files with 303 additions and 302 deletions

View File

@@ -353,7 +353,7 @@ void CClient::process(int what)
*serv >> sas;
std::cout << "Active stack: " << sas.stack <<std::endl;
gs->apply(&sas);
boost::thread(boost::bind(&CClient::waitForMoveAndSend,this,gs->curB->stacks[sas.stack]->owner));
boost::thread(boost::bind(&CClient::waitForMoveAndSend,this,gs->curB->getStack(sas.stack)->owner));
break;
}
case 3003:
@@ -368,8 +368,18 @@ void CClient::process(int what)
playerint[gs->curB->side2]->battleEnd(&br);
gs->apply(&br);
break;
}
case 3004:
{
BattleStackMoved br;
*serv >> br;
std::cout << "Stack "<<br.stack <<" moves to the tile "<<br.tile<<std::endl;
if(playerint.find(gs->curB->side1) != playerint.end())
playerint[gs->curB->side1]->battleStackMoved(br.stack,br.tile,br.flags&1,br.flags&2);
if(playerint.find(gs->curB->side2) != playerint.end())
playerint[gs->curB->side2]->battleStackMoved(br.stack,br.tile,br.flags&1,br.flags&2);
gs->apply(&br);
break;
}
case 9999: