mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Fix log messages for GCC compatibility
This commit is contained in:
parent
d3c9864fb0
commit
90215f4e7c
3 changed files with 20 additions and 20 deletions
|
@ -43,7 +43,7 @@ MWWorld::Ptr DedicatedPlayer::getPtr()
|
|||
|
||||
void Players::CreatePlayer(RakNet::RakNetGUID id)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Setting up character info\n");
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Setting up character info\n");
|
||||
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
MWWorld::Ptr player = world->getPlayerPtr();
|
||||
|
|
|
@ -383,7 +383,7 @@ void LocalPlayer::updateCell(bool forceUpdate)
|
|||
|
||||
if (shouldUpdate)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_GAME_CELL to server\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Sending ID_GAME_CELL to server\n");
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Moved from %s to %s\n",
|
||||
GetCell()->getDescription().c_str(),
|
||||
|
@ -486,7 +486,7 @@ bool LocalPlayer::CharGenThread() // ToDo: need fix
|
|||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
(*Npc()) = *player.get<ESM::NPC>()->mBase;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_GAME_BASE_INFO to server with my CharGen info\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Sending ID_GAME_BASE_INFO to server with my CharGen info\n");
|
||||
GetNetworking()->GetPacket(ID_GAME_BASE_INFO)->Send(this);
|
||||
|
||||
if (CharGenStage()->end != 1)
|
||||
|
|
|
@ -50,30 +50,30 @@ void Networking::Update()
|
|||
switch (packet->data[0])
|
||||
{
|
||||
case ID_REMOTE_DISCONNECTION_NOTIFICATION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has disconnected.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Another client has disconnected.\n");
|
||||
break;
|
||||
case ID_REMOTE_CONNECTION_LOST:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has lost connection.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Another client has lost connection.\n");
|
||||
break;
|
||||
case ID_REMOTE_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has connected.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Another client has connected.\n");
|
||||
break;
|
||||
case ID_CONNECTION_REQUEST_ACCEPTED:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Our connection request has been accepted.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "Our connection request has been accepted.\n");
|
||||
break;
|
||||
case ID_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "A connection is incoming.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "A connection is incoming.\n");
|
||||
break;
|
||||
case ID_NO_FREE_INCOMING_CONNECTIONS:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "The server is full.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "The server is full.\n");
|
||||
MWBase::Environment::get().getStateManager()->requestQuit();
|
||||
break;
|
||||
case ID_DISCONNECTION_NOTIFICATION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "We have been disconnected.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "We have been disconnected.\n");
|
||||
MWBase::Environment::get().getStateManager()->requestQuit();
|
||||
break;
|
||||
case ID_CONNECTION_LOST:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Connection lost.\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "Connection lost.\n");
|
||||
MWBase::Environment::get().getStateManager()->requestQuit();
|
||||
break;
|
||||
default:
|
||||
|
@ -133,7 +133,7 @@ void Networking::Connect(const std::string &ip, unsigned short port)
|
|||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONNECTION_REQUESTED_ACCEPTED from %s\n",
|
||||
serverAddr.ToString());
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_GAME_BASE_INFO to server\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Sending ID_GAME_BASE_INFO to server\n");
|
||||
|
||||
GetPacket(ID_GAME_BASE_INFO)->Send(getLocalPlayer());
|
||||
|
||||
|
@ -186,21 +186,21 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
|||
}
|
||||
case ID_GAME_BASE_INFO:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_BASE_INFO from server\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Received ID_GAME_BASE_INFO from server\n");
|
||||
|
||||
if (id == myid)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Packet was about my id\n");
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Packet was about my id\n");
|
||||
|
||||
if (packet->length == myPacket->headerSize())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Requesting info");
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Requesting info");
|
||||
myPacket->Send(getLocalPlayer(), serverAddr);
|
||||
}
|
||||
else
|
||||
{
|
||||
myPacket->Packet(&bsIn, getLocalPlayer(), false);
|
||||
LOG_APPEND(Log::LOG_INFO, "- Updating LocalPlayer\n");
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Updating LocalPlayer\n");
|
||||
getLocalPlayer()->updateChar();
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
|||
|
||||
if (pl == 0) {
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Exchanging data with new player\n");
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Exchanging data with new player\n");
|
||||
pl = Players::NewPlayer(id);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
|||
{
|
||||
if (packet->length != myPacket->headerSize())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "ID_GAME_UPDATE_POS changed by server\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "ID_GAME_UPDATE_POS changed by server\n");
|
||||
myPacket->Packet(&bsIn, getLocalPlayer(), false);
|
||||
getLocalPlayer()->setPosition();
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
|||
}
|
||||
case ID_USER_MYID:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_USER_MYID from server");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Received ID_USER_MYID from server");
|
||||
myid = id;
|
||||
getLocalPlayer()->guid = id;
|
||||
break;
|
||||
|
@ -382,7 +382,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
|||
}
|
||||
case ID_GAME_DIE:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_DIE from server\n");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Received ID_GAME_DIE from server\n");
|
||||
if (id == myid)
|
||||
{
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
|
|
Loading…
Reference in a new issue