Rename ID_GAME_UPDATE_POS into ID_GAME_POS

pull/76/head
David Cernat 8 years ago
parent 26487598a6
commit 57f07813b0

@ -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<Script::CallbackIdentity("OnPlayerResurrect")>(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);
}

@ -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);
}

@ -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);
}
}

@ -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();
}

@ -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,

@ -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;
}

Loading…
Cancel
Save