1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fixed Duel mode. Integrated some changes from programmingChallenge branch - it's possible to define duel parameters using JSON.

This commit is contained in:
Michał W. Urbańczyk
2012-07-26 00:48:44 +00:00
parent 9327823355
commit 5981ad15d4
5 changed files with 227 additions and 58 deletions

View File

@@ -393,9 +393,11 @@ void CClient::newGame( CConnection *con, StartInfo *si )
if(si->mode == StartInfo::DUEL)
{
boost::unique_lock<boost::recursive_mutex> un(*LOCPLINT->pim);
CPlayerInterface *p = new CPlayerInterface(-1);
p->observerInDuelMode = true;
battleints[254] = playerint[254] = p;
privilagedBattleEventReceivers.push_back(p);
GH.curInt = p;
p->init(new CCallback(gs, -1, this));
battleStarted(gs->curB);