1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
* showing ranges
* improvements in moving
* workaround for neutrals
This commit is contained in:
Michał W. Urbańczyk
2008-08-05 23:33:08 +00:00
parent c7bb04235c
commit d8eb861117
6 changed files with 61 additions and 363 deletions

View File

@@ -354,7 +354,18 @@ 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->getStack(sas.stack)->owner));
int owner = gs->curB->getStack(sas.stack)->owner;
if(owner >= PLAYER_LIMIT) //ugly workaround to skip neutral creatures - should be replaced with AI
{
BattleAction ba;
ba.stackNumber = sas.stack;
ba.actionType = 3;
*serv << ui16(3002) << ba;
}
else
{
boost::thread(boost::bind(&CClient::waitForMoveAndSend,this,owner));
}
break;
}
case 3003: