mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Use mRefNum.mIndex instead of just mRefNum and add extra debug
This commit is contained in:
parent
17f66e4e90
commit
cbc132612a
6 changed files with 26 additions and 11 deletions
|
@ -393,8 +393,13 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet)
|
|||
|
||||
myPacket->Read(event);
|
||||
|
||||
LOG_APPEND(Log::LOG_WARN, "- %s", event->cellRef.mRefID.c_str());
|
||||
LOG_APPEND(Log::LOG_WARN, "- %i", event->cellRef.mRefNum);
|
||||
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %i, %i, %i, %s",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.mData.mFlags,
|
||||
event->cell.mCellId.mIndex.mX,
|
||||
event->cell.mCellId.mIndex.mY,
|
||||
event->cell.mName.c_str());
|
||||
|
||||
myPacket->Send(event, true);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace MWGui
|
|||
|
||||
printf("Sending ID_WORLD_OBJECT_PLACE about %s\n%i\n",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum);
|
||||
event->cellRef.mRefNum.mIndex);
|
||||
|
||||
return dropped;
|
||||
}
|
||||
|
|
|
@ -637,9 +637,13 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet)
|
|||
MWWorld::CellStore *ptrCellStore;
|
||||
|
||||
if (event->cell.isExterior())
|
||||
{
|
||||
ptrCellStore = MWBase::Environment::get().getWorld()->getExterior(event->cell.mData.mX, event->cell.mData.mY);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptrCellStore = MWBase::Environment::get().getWorld()->getInterior(event->cell.mName);
|
||||
}
|
||||
|
||||
switch (packet->data[0])
|
||||
{
|
||||
|
@ -654,11 +658,13 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet)
|
|||
case ID_WORLD_OBJECT_DELETE:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s", "Received ID_WORLD_OBJECT_DELETE");
|
||||
LOG_APPEND(Log::LOG_WARN, "- cellRefId: %s, %i",
|
||||
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %i, %i, %i, %s",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum);
|
||||
LOG_APPEND(Log::LOG_WARN, "- cell: %s",
|
||||
event->cell.getDescription().c_str());
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.mData.mFlags,
|
||||
event->cell.mCellId.mIndex.mX,
|
||||
event->cell.mCellId.mIndex.mY,
|
||||
event->cell.mName.c_str());
|
||||
|
||||
MWWorld::Ptr ptrFound = ptrCellStore->searchByRefNum(event->cellRef.mRefNum);
|
||||
|
||||
|
|
|
@ -29,9 +29,13 @@ namespace MWWorld
|
|||
event->cellRef.mRefNum = getTarget().getCellRef().getRefNum();
|
||||
mwmp::Main::get().getNetworking()->GetWorldPacket(ID_WORLD_OBJECT_DELETE)->Send(event);
|
||||
|
||||
printf("Sending ID_WORLD_OBJECT_DELETE about %s\n%i\n",
|
||||
printf("Sending ID_WORLD_OBJECT_DELETE about\n- cellRef: %s, %i\n- cell: %i, %i, %i, %s",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum);
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.mData.mFlags,
|
||||
event->cell.mCellId.mIndex.mX,
|
||||
event->cell.mCellId.mIndex.mY,
|
||||
event->cell.mName.c_str());
|
||||
|
||||
MWBase::Environment::get().getWorld()->deleteObject (getTarget());
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ void PacketObjectDelete::Packet(RakNet::BitStream *bs, WorldEvent *event, bool s
|
|||
WorldPacket::Packet(bs, event, send);
|
||||
|
||||
RW(event->cellRef.mRefID, send);
|
||||
RW(event->cellRef.mRefNum, send);
|
||||
RW(event->cellRef.mRefNum.mIndex, send);
|
||||
|
||||
RW(event->cell.mData.mFlags, send);
|
||||
RW(event->cell.mCellId.mIndex.mX, send);
|
||||
|
|
|
@ -13,7 +13,7 @@ void PacketObjectPlace::Packet(RakNet::BitStream *bs, WorldEvent *event, bool se
|
|||
WorldPacket::Packet(bs, event, send);
|
||||
|
||||
RW(event->cellRef.mRefID, send);
|
||||
RW(event->cellRef.mRefNum, send);
|
||||
RW(event->cellRef.mRefNum.mIndex, send);
|
||||
RW(event->cellRef.mPos, send);
|
||||
|
||||
RW(event->cell.mData.mFlags, send);
|
||||
|
|
Loading…
Reference in a new issue