mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
Read contents of ID_WORLD_OBJECT_REMOVAL on client
This commit is contained in:
parent
36f218876a
commit
32dc8cf63f
1 changed files with 18 additions and 0 deletions
|
@ -611,6 +611,7 @@ void Networking::ProcessPlayerPacket(RakNet::Packet *packet)
|
|||
else if (getLocalPlayer()->month != -1)
|
||||
world->setMonth(getLocalPlayer()->month);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Unhandled PlayerPacket with identifier %i has arrived",
|
||||
|
@ -620,13 +621,30 @@ void Networking::ProcessPlayerPacket(RakNet::Packet *packet)
|
|||
|
||||
void Networking::ProcessWorldPacket(RakNet::Packet *packet)
|
||||
{
|
||||
RakNet::RakNetGUID id;
|
||||
RakNet::BitStream bsIn(&packet->data[1], packet->length, false);
|
||||
bsIn.Read(id);
|
||||
|
||||
DedicatedPlayer *pl = 0;
|
||||
static RakNet::RakNetGUID myid = getLocalPlayer()->guid;
|
||||
if (id != myid)
|
||||
pl = Players::GetPlayer(id);
|
||||
|
||||
WorldPacket *myPacket = worldController.GetPacket(packet->data[0]);
|
||||
WorldEvent *event = new WorldEvent(id);
|
||||
|
||||
switch (packet->data[0])
|
||||
{
|
||||
case ID_WORLD_OBJECT_REMOVAL:
|
||||
{
|
||||
myPacket->Packet(&bsIn, event, false);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "Received ID_WORLD_OBJECT_REMOVAL");
|
||||
LOG_APPEND(Log::LOG_WARN, "- cellRefId: %s, %i",
|
||||
event->CellRef()->mRefID.c_str(),
|
||||
event->CellRef()->mRefNum);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Unhandled WorldPacket with identifier %i has arrived",
|
||||
|
|
Loading…
Reference in a new issue