forked from mirror/openmw-tes3mp
Create marker once a player has been initialized properly and fix debug
This commit is contained in:
parent
be73265848
commit
b2688777c1
2 changed files with 10 additions and 10 deletions
|
@ -10,8 +10,8 @@ TSlots Players::slots;
|
||||||
|
|
||||||
void Players::DeletePlayer(RakNet::RakNetGUID id)
|
void Players::DeletePlayer(RakNet::RakNetGUID id)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %s",
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %lu",
|
||||||
id.ToString());
|
id.g);
|
||||||
|
|
||||||
if (players[id] != 0)
|
if (players[id] != 0)
|
||||||
{
|
{
|
||||||
|
@ -27,8 +27,8 @@ void Players::DeletePlayer(RakNet::RakNetGUID id)
|
||||||
|
|
||||||
void Players::NewPlayer(RakNet::RakNetGUID id)
|
void Players::NewPlayer(RakNet::RakNetGUID id)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Creating new player with guid %s",
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Creating new player with guid %lu",
|
||||||
id.ToString());
|
id.g);
|
||||||
|
|
||||||
players[id] = new Player(id);
|
players[id] = new Player(id);
|
||||||
players[id]->GetCell()->blank();
|
players[id]->GetCell()->blank();
|
||||||
|
|
|
@ -102,16 +102,16 @@ void Players::CreatePlayer(RakNet::RakNetGUID id)
|
||||||
esm_store->insert(npc);
|
esm_store->insert(npc);
|
||||||
|
|
||||||
dedicPlayer->updateCell();
|
dedicPlayer->updateCell();
|
||||||
|
|
||||||
|
ESM::CustomMarker mEditingMarker = Main::get().getGUIController()->CreateMarker(id);
|
||||||
|
dedicPlayer->marker = mEditingMarker;
|
||||||
|
dedicPlayer->setMarkerState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
dedicPlayer->guid = id;
|
dedicPlayer->guid = id;
|
||||||
dedicPlayer->state = 2;
|
dedicPlayer->state = 2;
|
||||||
|
|
||||||
world->enable(players[id]->ptr);
|
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)
|
DedicatedPlayer *Players::NewPlayer(RakNet::RakNetGUID guid)
|
||||||
{
|
{
|
||||||
LOG_APPEND(Log::LOG_INFO, "- Creating new DedicatedPlayer with guid %i",
|
LOG_APPEND(Log::LOG_INFO, "- Creating new DedicatedPlayer with guid %lu",
|
||||||
guid.ToUint32);
|
guid.g);
|
||||||
|
|
||||||
players[guid] = new DedicatedPlayer(guid);
|
players[guid] = new DedicatedPlayer(guid);
|
||||||
players[guid]->state = 0;
|
players[guid]->state = 0;
|
||||||
|
|
Loading…
Reference in a new issue