From 57f07813b0d50a78d3a755a35ffedad3b8d7857b Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 28 Sep 2016 11:45:14 +0300 Subject: [PATCH] Rename ID_GAME_UPDATE_POS into ID_GAME_POS --- apps/openmw-mp/Networking.cpp | 10 +++++----- apps/openmw-mp/Script/Functions/Translocations.cpp | 4 ++-- apps/openmw/mwmp/LocalPlayer.cpp | 4 ++-- apps/openmw/mwmp/Networking.cpp | 4 ++-- components/openmw-mp/NetworkMessages.hpp | 2 +- components/openmw-mp/Packets/PacketPosition.cpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 894416d08..f59a8f6fc 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -152,9 +152,9 @@ void Networking::Update(RakNet::Packet *packet) break; }*/ - case ID_GAME_UPDATE_POS: + case ID_GAME_POS: { - //DEBUG_PRINTF("ID_GAME_UPDATE_POS \n"); + //DEBUG_PRINTF("ID_GAME_POS \n"); if (!player->CreatureStats()->mDead) { @@ -291,7 +291,7 @@ void Networking::Update(RakNet::Packet *packet) //packetResurrect.Read(player); player->CreatureStats()->mDead = false; myPacket->Send(player, true); - controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(player->guid); + controller->GetPacket(ID_GAME_POS)->RequestData(player->guid); controller->GetPacket(ID_GAME_CELL)->RequestData(player->guid); Script::Call(player->GetID()); @@ -363,7 +363,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) { controller->GetPacket(ID_GAME_BASE_INFO)->RequestData(guid); controller->GetPacket(ID_GAME_DYNAMICSTATS_CURRENT)->RequestData(guid); - controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid); + controller->GetPacket(ID_GAME_POS)->RequestData(guid); controller->GetPacket(ID_GAME_CELL)->RequestData(guid); controller->GetPacket(ID_GAME_EQUIPMENT)->RequestData(guid); @@ -375,7 +375,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) controller->GetPacket(ID_GAME_DYNAMICSTATS_CURRENT)->Send(pl->second, guid); controller->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid); controller->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid); - controller->GetPacket(ID_GAME_UPDATE_POS)->Send(pl->second, guid); + controller->GetPacket(ID_GAME_POS)->Send(pl->second, guid); controller->GetPacket(ID_GAME_CELL)->Send(pl->second, guid); controller->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); } diff --git a/apps/openmw-mp/Script/Functions/Translocations.cpp b/apps/openmw-mp/Script/Functions/Translocations.cpp index f34c48cd0..3c468650e 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.cpp +++ b/apps/openmw-mp/Script/Functions/Translocations.cpp @@ -58,7 +58,7 @@ void TranslocationFunctions::SetPos(unsigned short pid, double x, double y, doub player->Position()->pos[1] = y; player->Position()->pos[2] = z; - mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_POS)->Send(player, false); + mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_POS)->Send(player, false); } void TranslocationFunctions::SetCell(unsigned short pid, const char *name) noexcept @@ -183,5 +183,5 @@ void TranslocationFunctions::SetAngle(unsigned short pid, double x, double y, do player->Position()->rot[1] = y; player->Position()->rot[2] = z; - mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_POS)->Send(player, false); + mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_POS)->Send(player, false); } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index a5ab4aa84..4ac8bf9cf 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -160,7 +160,7 @@ void LocalPlayer::updatePosition(bool forceUpdate) Dir()->pos[1] = move.mPosition[1]; Dir()->pos[2] = move.mPosition[2]; - GetNetworking()->GetPacket(ID_GAME_UPDATE_POS)->Send(this); + GetNetworking()->GetPacket(ID_GAME_POS)->Send(this); } else if (isJumping && world->isOnGround(player)) { @@ -172,7 +172,7 @@ void LocalPlayer::updatePosition(bool forceUpdate) sentJumpEnd = true; (*Position()) = _pos; - GetNetworking()->GetPacket(ID_GAME_UPDATE_POS)->Send(this); + GetNetworking()->GetPacket(ID_GAME_POS)->Send(this); } } diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 148283623..f2065ae04 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -223,13 +223,13 @@ void Networking::ReceiveMessage(RakNet::Packet *packet) } break; } - case ID_GAME_UPDATE_POS: + case ID_GAME_POS: { if (id == myid) { if (packet->length != myPacket->headerSize()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "ID_GAME_UPDATE_POS changed by server"); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "ID_GAME_POS changed by server"); myPacket->Packet(&bsIn, getLocalPlayer(), false); getLocalPlayer()->setPosition(); } diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 120e5990f..f64ae6734 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -11,7 +11,7 @@ enum GameMessages { ID_GAME_BASE_INFO = ID_USER_PACKET_ENUM+1, ID_GAME_CHARGEN, - ID_GAME_UPDATE_POS, + ID_GAME_POS, ID_GAME_DYNAMICSTATS_BASE, ID_GAME_DYNAMICSTATS_CURRENT, ID_GAME_ATTACK, diff --git a/components/openmw-mp/Packets/PacketPosition.cpp b/components/openmw-mp/Packets/PacketPosition.cpp index dd620bece..c1ded2814 100644 --- a/components/openmw-mp/Packets/PacketPosition.cpp +++ b/components/openmw-mp/Packets/PacketPosition.cpp @@ -10,7 +10,7 @@ using namespace mwmp; PacketPosition::PacketPosition(RakNet::RakPeerInterface *peer) : BasePacket(peer) { - packetID = ID_GAME_UPDATE_POS; + packetID = ID_GAME_POS; priority = MEDIUM_PRIORITY; //reliability = UNRELIABLE_SEQUENCED; }