diff --git a/AI/VCAI/StdInc.h b/AI/VCAI/StdInc.h index 913c0d52b..a013f23d9 100644 --- a/AI/VCAI/StdInc.h +++ b/AI/VCAI/StdInc.h @@ -34,8 +34,8 @@ using boost::str; #define INDENT AILogger::Tab ___dummy_ind -#define PNLOG(txt) {int i = logger.lvl; while(i--) printf("\t"); tlog4 << txt; printf("\n");} -#define BNLOG(txt, formattingEls) {int i = logger.lvl; while(i--) printf("\t"); tlog4 << (boost::format(txt) % formattingEls); printf("\n");} +#define PNLOG(txt) {int i = logger.lvl; while(i--) tlog4 << "\t"; tlog4 << txt << "\n";} +#define BNLOG(txt, formattingEls) {int i = logger.lvl; while(i--) tlog4 << "\t"; tlog4 << (boost::format(txt) % formattingEls) << "\n";} //#define LOG_ENTRY PNLOG("Entered " __FUNCTION__) #define LOG_ENTRY diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index f4e16c933..f27dba339 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -718,6 +718,7 @@ void VCAI::init(CCallback * CB) LOG_ENTRY; playerID = myCb->getMyColor(); myCb->waitTillRealize = true; + myCb->unlockGsWhenWaiting = true; retreiveVisitableObjs(visitableObjs); } diff --git a/CCallback.cpp b/CCallback.cpp index 1a4bdc333..9d633664f 100644 --- a/CCallback.cpp +++ b/CCallback.cpp @@ -333,6 +333,7 @@ CCallback::CCallback( CGameState * GS, int Player, CClient *C ) :CBattleCallback(GS, Player, C) { waitTillRealize = false; + unlockGsWhenWaiting = false; } const CGPathNode * CCallback::getPathInfo( int3 tile ) diff --git a/client/CMT.cpp b/client/CMT.cpp index 06e8ec5a7..e1739b002 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -543,10 +543,10 @@ void processCommand(const std::string &message) readed >> fname; startGameFromFile(fname); } - else if(client && client->serv && client->serv->connected) //send to server + else if(client && client->serv && client->serv->connected && LOCPLINT) //send to server { - PlayerMessage pm(LOCPLINT->playerID,message); - *client->serv << ± + boost::unique_lock un(*LOCPLINT->pim); + LOCPLINT->cb->sendMessage(message); } }