forked from mirror/openmw-tes3mp
[General] Add placeholders for the new packet ID_PLAYER_CELL_LOAD
This commit is contained in:
parent
25e535e8ad
commit
1d9c6ddd81
8 changed files with 60 additions and 1 deletions
|
@ -171,6 +171,15 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ID_PLAYER_CELL_LOAD:
|
||||||
|
{
|
||||||
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_CELL_LOAD from %s",
|
||||||
|
player->Npc()->mName.c_str());
|
||||||
|
|
||||||
|
Script::Call<Script::CallbackIdentity("OnPlayerCellLoad")>(player->getId());
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ID_GAME_ATTRIBUTE:
|
case ID_GAME_ATTRIBUTE:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ public:
|
||||||
{"OnPlayerDeath", Function<void, unsigned short, short, unsigned short>()},
|
{"OnPlayerDeath", Function<void, unsigned short, short, unsigned short>()},
|
||||||
{"OnPlayerResurrect", Function<void, unsigned short>()},
|
{"OnPlayerResurrect", Function<void, unsigned short>()},
|
||||||
{"OnPlayerChangeCell", Function<void, unsigned short>()},
|
{"OnPlayerChangeCell", Function<void, unsigned short>()},
|
||||||
|
{"OnPlayerCellLoad", Function<void, unsigned short>()},
|
||||||
{"OnPlayerChangeAttributes", Function<void, unsigned short>()},
|
{"OnPlayerChangeAttributes", Function<void, unsigned short>()},
|
||||||
{"OnPlayerChangeSkills", Function<void, unsigned short>()},
|
{"OnPlayerChangeSkills", Function<void, unsigned short>()},
|
||||||
{"OnPlayerChangeLevel", Function<void, unsigned short>()},
|
{"OnPlayerChangeLevel", Function<void, unsigned short>()},
|
||||||
|
|
|
@ -532,6 +532,10 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ID_PLAYER_CELL_LOAD:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ID_GAME_DRAWSTATE:
|
case ID_GAME_DRAWSTATE:
|
||||||
{
|
{
|
||||||
if (guid == myGuid)
|
if (guid == myGuid)
|
||||||
|
|
|
@ -159,6 +159,7 @@ add_component_dir (openmw-mp
|
||||||
Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime
|
Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime
|
||||||
Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketJournal
|
Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketJournal
|
||||||
Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange
|
Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange
|
||||||
|
Packets/Player/PacketPlayerCellLoad
|
||||||
|
|
||||||
Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock
|
Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock
|
||||||
Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove
|
Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include "../Packets/Player/PacketClass.hpp"
|
#include "../Packets/Player/PacketClass.hpp"
|
||||||
#include "../Packets/Player/PacketPosition.hpp"
|
#include "../Packets/Player/PacketPosition.hpp"
|
||||||
|
#include "../Packets/Player/PacketPlayerCellChange.hpp"
|
||||||
|
#include "../Packets/Player/PacketPlayerCellLoad.hpp"
|
||||||
#include "../Packets/Player/PacketBaseInfo.hpp"
|
#include "../Packets/Player/PacketBaseInfo.hpp"
|
||||||
#include "../Packets/Player/PacketEquipment.hpp"
|
#include "../Packets/Player/PacketEquipment.hpp"
|
||||||
#include "../Packets/Player/PacketAttack.hpp"
|
#include "../Packets/Player/PacketAttack.hpp"
|
||||||
|
@ -27,7 +29,6 @@
|
||||||
#include "../Packets/Player/PacketJournal.hpp"
|
#include "../Packets/Player/PacketJournal.hpp"
|
||||||
#include "../Packets/Player/PacketConsole.hpp"
|
#include "../Packets/Player/PacketConsole.hpp"
|
||||||
#include "../Packets/Player/PacketActiveSkills.hpp"
|
#include "../Packets/Player/PacketActiveSkills.hpp"
|
||||||
#include "../Packets/Player/PacketPlayerCellChange.hpp"
|
|
||||||
|
|
||||||
#include "PlayerPacketController.hpp"
|
#include "PlayerPacketController.hpp"
|
||||||
|
|
||||||
|
@ -43,6 +44,8 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
|
||||||
{
|
{
|
||||||
AddPacket<PacketPosition>(&packets, peer);
|
AddPacket<PacketPosition>(&packets, peer);
|
||||||
AddPacket<PacketPlayerCellChange>(&packets, peer);
|
AddPacket<PacketPlayerCellChange>(&packets, peer);
|
||||||
|
AddPacket<PacketPlayerCellLoad>(&packets, peer);
|
||||||
|
|
||||||
AddPacket<PacketBaseInfo>(&packets, peer);
|
AddPacket<PacketBaseInfo>(&packets, peer);
|
||||||
AddPacket<PacketEquipment>(&packets, peer);
|
AddPacket<PacketEquipment>(&packets, peer);
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ enum GameMessages
|
||||||
ID_GAME_ACTIVESKILLS,
|
ID_GAME_ACTIVESKILLS,
|
||||||
|
|
||||||
ID_PLAYER_CELL_CHANGE,
|
ID_PLAYER_CELL_CHANGE,
|
||||||
|
ID_PLAYER_CELL_LOAD,
|
||||||
|
|
||||||
ID_OBJECT_PLACE,
|
ID_OBJECT_PLACE,
|
||||||
ID_OBJECT_DELETE,
|
ID_OBJECT_DELETE,
|
||||||
|
|
20
components/openmw-mp/Packets/Player/PacketPlayerCellLoad.cpp
Normal file
20
components/openmw-mp/Packets/Player/PacketPlayerCellLoad.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
#include "PacketPlayerCellLoad.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
mwmp::PacketPlayerCellLoad::PacketPlayerCellLoad(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||||
|
{
|
||||||
|
packetID = ID_PLAYER_CELL_CHANGE;
|
||||||
|
priority = IMMEDIATE_PRIORITY;
|
||||||
|
reliability = RELIABLE_ORDERED;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mwmp::PacketPlayerCellLoad::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
|
||||||
|
{
|
||||||
|
PlayerPacket::Packet(bs, player, send);
|
||||||
|
|
||||||
|
RW(player->getCell()->mData.mFlags, send);
|
||||||
|
RW(player->getCell()->mData.mX, send);
|
||||||
|
RW(player->getCell()->mData.mY, send);
|
||||||
|
RW(player->getCell()->mName, send);
|
||||||
|
}
|
20
components/openmw-mp/Packets/Player/PacketPlayerCellLoad.hpp
Normal file
20
components/openmw-mp/Packets/Player/PacketPlayerCellLoad.hpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef OPENMW_PACKETPLAYERCELLLOAD_HPP
|
||||||
|
#define OPENMW_PACKETPLAYERCELLLOAD_HPP
|
||||||
|
|
||||||
|
|
||||||
|
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||||
|
|
||||||
|
namespace mwmp
|
||||||
|
{
|
||||||
|
class PacketPlayerCellLoad : public PlayerPacket
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PacketPlayerCellLoad(RakNet::RakPeerInterface *peer);
|
||||||
|
|
||||||
|
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //OPENMW_PACKETPLAYERCELLLOAD_HPP
|
Loading…
Reference in a new issue