Rename ID_GAME_CELL into ID_PLAYER_CELL_CHANGE

pull/133/head
David Cernat 8 years ago
parent 745ddd9a69
commit a69f294ef0

@ -148,9 +148,9 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
break;
}
case ID_GAME_CELL:
case ID_PLAYER_CELL_CHANGE:
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_CELL from %s",
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_CELL_CHANGE from %s",
player->Npc()->mName.c_str());
if (!player->CreatureStats()->mDead)
@ -318,7 +318,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
player->CreatureStats()->mDead = false;
myPacket->Send(player, true);
playerController->GetPacket(ID_GAME_POS)->RequestData(player->guid);
playerController->GetPacket(ID_GAME_CELL)->RequestData(player->guid);
playerController->GetPacket(ID_PLAYER_CELL_CHANGE)->RequestData(player->guid);
Script::Call<Script::CallbackIdentity("OnPlayerResurrect")>(player->getId());
@ -729,7 +729,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
playerController->GetPacket(ID_GAME_BASE_INFO)->RequestData(guid);
playerController->GetPacket(ID_GAME_DYNAMICSTATS)->RequestData(guid);
playerController->GetPacket(ID_GAME_POS)->RequestData(guid);
playerController->GetPacket(ID_GAME_CELL)->RequestData(guid);
playerController->GetPacket(ID_PLAYER_CELL_CHANGE)->RequestData(guid);
playerController->GetPacket(ID_GAME_EQUIPMENT)->RequestData(guid);
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Sending info about other players to %lu",
@ -754,7 +754,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_POS)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_CELL)->Send(pl->second, guid);
playerController->GetPacket(ID_PLAYER_CELL_CHANGE)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid);
}
}

@ -191,6 +191,6 @@ void TranslocationFunctions::SendCell(unsigned short pid) noexcept
Player *player;
GET_PLAYER(pid, player, );
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_CELL)->Send(player, false);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_CELL_CHANGE)->Send(player, false);
}

@ -334,7 +334,7 @@ void LocalPlayer::updateCell(bool forceUpdate)
if (cellChanged)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_GAME_CELL to server");
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_CELL_CHANGE to server");
LOG_APPEND(Log::LOG_INFO, "- Moved from %s to %s",
getCell()->getDescription().c_str(),
@ -347,7 +347,7 @@ void LocalPlayer::updateCell(bool forceUpdate)
updatePosition(true);
RakNet::BitStream bs;
getNetworking()->getPlayerPacket((RakNet::MessageID) ID_GAME_CELL)->Packet(&bs, this, true);
getNetworking()->getPlayerPacket((RakNet::MessageID) ID_PLAYER_CELL_CHANGE)->Packet(&bs, this, true);
getNetworking()->sendData(&bs);
// Also force an update to skills (to send all progress to skill increases)

@ -497,7 +497,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
}
break;
}
case ID_GAME_CELL:
case ID_PLAYER_CELL_CHANGE:
{
if (guid == myGuid)
{

@ -153,12 +153,12 @@ add_component_dir (openmw-mp
Packets/BasePacket Packets/Player/PlayerPacket Packets/World/WorldPacket
Packets/Player/PacketBaseInfo Packets/Player/PacketPosition Packets/Player/PacketEquipment
Packets/Player/PacketAttack Packets/Player/PacketDynamicStats Packets/Player/PacketCell
Packets/Player/PacketDrawState Packets/Player/PacketChatMessage Packets/Player/PacketCharGen
Packets/Player/PacketAttribute Packets/Player/PacketSkill Packets/Player/PacketLevel
Packets/Player/PacketHandshake Packets/Player/PacketGUIBoxes Packets/Player/PacketClass
Packets/Player/PacketTime Packets/Player/PacketInventory Packets/Player/PacketSpellbook
Packets/Player/PacketActiveSkills
Packets/Player/PacketAttack Packets/Player/PacketDynamicStats Packets/Player/PacketDrawState
Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketAttribute
Packets/Player/PacketSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake
Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime
Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketActiveSkills
Packets/Player/PacketPlayerCellChange
Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock
Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove

@ -10,7 +10,6 @@
#include "../Packets/Player/PacketDynamicStats.hpp"
#include "../Packets/Player/PacketResurrect.hpp"
#include "../Packets/Player/PacketDie.hpp"
#include "../Packets/Player/PacketCell.hpp"
#include "../Packets/Player/PacketSendMyID.hpp"
#include "../Packets/Player/PacketDisconnect.hpp"
#include "../Packets/Player/PacketDrawState.hpp"
@ -27,6 +26,7 @@
#include "../Packets/Player/PacketSpellbook.hpp"
#include "../Packets/Player/PacketConsole.hpp"
#include "../Packets/Player/PacketActiveSkills.hpp"
#include "../Packets/Player/PacketPlayerCellChange.hpp"
#include "PlayerPacketController.hpp"
@ -41,7 +41,7 @@ inline void AddPacket(mwmp::PlayerPacketController::packets_t *packets, RakNet::
mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *peer)
{
AddPacket<PacketPosition>(&packets, peer);
AddPacket<PacketCell>(&packets, peer);
AddPacket<PacketPlayerCellChange>(&packets, peer);
AddPacket<PacketBaseInfo>(&packets, peer);
AddPacket<PacketEquipment>(&packets, peer);

@ -21,7 +21,6 @@ enum GameMessages
ID_GAME_DIE,
ID_GAME_RESURRECT,
ID_CHAT_MESSAGE,
ID_GAME_CELL,
ID_GAME_DRAWSTATE,
ID_GAME_ATTRIBUTE,
@ -36,6 +35,8 @@ enum GameMessages
ID_GAME_SPELLBOOK,
ID_GAME_ACTIVESKILLS,
ID_PLAYER_CELL_CHANGE,
ID_OBJECT_PLACE,
ID_OBJECT_DELETE,
ID_OBJECT_LOCK,

@ -1,24 +0,0 @@
//
// Created by koncord on 15.01.16.
//
#ifndef OPENMW_PACKETCELL_HPP
#define OPENMW_PACKETCELL_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketCell : public PlayerPacket
{
public:
PacketCell(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
};
}
#endif //OPENMW_PACKETCELL_HPP

@ -3,17 +3,17 @@
//
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketCell.hpp"
#include "PacketPlayerCellChange.hpp"
mwmp::PacketCell::PacketCell(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
mwmp::PacketPlayerCellChange::PacketPlayerCellChange(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_CELL;
packetID = ID_PLAYER_CELL_CHANGE;
priority = IMMEDIATE_PRIORITY;
reliability = RELIABLE_ORDERED;
}
void mwmp::PacketCell::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
void mwmp::PacketPlayerCellChange::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
{
PlayerPacket::Packet(bs, player, send);

@ -0,0 +1,24 @@
//
// Created by koncord on 15.01.16.
//
#ifndef OPENMW_PACKETPLAYERCELLCHANGE_HPP
#define OPENMW_PACKETPLAYERCELLCHANGE_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketPlayerCellChange : public PlayerPacket
{
public:
PacketPlayerCellChange(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
};
}
#endif //OPENMW_PACKETPLAYERCELLCHANGE_HPP
Loading…
Cancel
Save