diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index 2b73bc0e9..caf4def0c 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -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(); diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 4a2b50d9a..a4144711f 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -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()->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) diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 85d7161b0..8c5b9b19f 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -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();