Create marker once a player has been initialized properly and fix debug

This commit is contained in:
David Cernat 2016-10-24 21:08:47 +03:00
parent be73265848
commit b2688777c1
2 changed files with 10 additions and 10 deletions

View file

@ -10,8 +10,8 @@ TSlots Players::slots;
void Players::DeletePlayer(RakNet::RakNetGUID id)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %s",
id.ToString());
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %lu",
id.g);
if (players[id] != 0)
{
@ -27,8 +27,8 @@ void Players::DeletePlayer(RakNet::RakNetGUID id)
void Players::NewPlayer(RakNet::RakNetGUID id)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Creating new player with guid %s",
id.ToString());
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Creating new player with guid %lu",
id.g);
players[id] = new Player(id);
players[id]->GetCell()->blank();

View file

@ -102,16 +102,16 @@ void Players::CreatePlayer(RakNet::RakNetGUID id)
esm_store->insert(npc);
dedicPlayer->updateCell();
ESM::CustomMarker mEditingMarker = Main::get().getGUIController()->CreateMarker(id);
dedicPlayer->marker = mEditingMarker;
dedicPlayer->setMarkerState(true);
}
dedicPlayer->guid = id;
dedicPlayer->state = 2;
world->enable(players[id]->ptr);
ESM::CustomMarker mEditingMarker = Main::get().getGUIController()->CreateMarker(id);
dedicPlayer->marker = mEditingMarker;
dedicPlayer->setMarkerState(true);
}
@ -284,8 +284,8 @@ void DedicatedPlayer::UpdatePtr(MWWorld::Ptr newPtr)
DedicatedPlayer *Players::NewPlayer(RakNet::RakNetGUID guid)
{
LOG_APPEND(Log::LOG_INFO, "- Creating new DedicatedPlayer with guid %i",
guid.ToUint32);
LOG_APPEND(Log::LOG_INFO, "- Creating new DedicatedPlayer with guid %lu",
guid.g);
players[guid] = new DedicatedPlayer(guid);
players[guid]->state = 0;