1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Little more logging.

This commit is contained in:
Michał W. Urbańczyk 2013-02-18 23:10:46 +00:00
parent d45a554fec
commit 6fdf64c2b1
2 changed files with 6 additions and 3 deletions

View File

@ -98,6 +98,7 @@ struct OCM_HLP_CGIN
CPlayerInterface::CPlayerInterface(int Player)
{
tlog5 << "\tHuman player interface for player " << Player << " being constructed\n";
observerInDuelMode = false;
howManyPeople++;
GH.defActionsDef = 0;
@ -115,6 +116,7 @@ CPlayerInterface::CPlayerInterface(int Player)
firstCall = 1; //if loading will be overwritten in serialize
autosaveCount = 0;
}
CPlayerInterface::~CPlayerInterface()
{
howManyPeople--;

View File

@ -361,6 +361,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
if(!vstd::contains(myPlayers, color))
continue;
tlog5 << "Preparing interface for player " << (int)color << std::endl;
if(si->mode != StartInfo::DUEL)
{
auto cb = make_shared<CCallback>(gs,color,this);
@ -381,6 +382,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
}
battleints[color] = playerint[color];
tlog5 << "\tInitializing the interface\n";
playerint[color]->init(cb.get());
battleCallbacks[color] = callbacks[color] = cb;
}
@ -683,7 +685,6 @@ template void CClient::serialize( COSer<CSaveFile> &h, const int version );
void CServerHandler::startServer()
{
th.update();
serverThread = new boost::thread(&CServerHandler::callServer, this); //runs server executable;
if(verbose)
tlog0 << "Setting up thread calling server: " << th.getDiff() << std::endl;
@ -723,7 +724,7 @@ CServerHandler::CServerHandler(bool runServer /*= false*/)
serverThread = NULL;
shared = NULL;
port = boost::lexical_cast<std::string>(settings["server"]["port"].Float());
verbose = false;
verbose = true;
boost::interprocess::shared_memory_object::remove("vcmi_memory"); //if the application has previously crashed, the memory may not have been removed. to avoid problems - try to destroy it
try