diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index de3ca9f0e..6b629fbe1 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -393,13 +393,10 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) myPacket->Read(event); - LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %i, %i, %i, %s", + LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %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()); + event->cell.getDescription().c_str()); myPacket->Send(event, true); diff --git a/apps/openmw-mp/Script/Functions/Translocations.cpp b/apps/openmw-mp/Script/Functions/Translocations.cpp index 202b91095..2fa2964bc 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.cpp +++ b/apps/openmw-mp/Script/Functions/Translocations.cpp @@ -108,8 +108,8 @@ void TranslocationFunctions::SetExterior(unsigned short pid, int x, int y) noexc player->GetCell()->mData.mFlags &= ~ESM::Cell::Interior; } - player->GetCell()->mCellId.mIndex.mX = x; - player->GetCell()->mCellId.mIndex.mY = y; + player->GetCell()->mData.mX = x; + player->GetCell()->mData.mY = y; mwmp::Networking::Get().GetPlayerController()->GetPacket(ID_GAME_CELL)->Send(player, false); } @@ -118,14 +118,14 @@ int TranslocationFunctions::GetExteriorX(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); - return player->GetCell()->mCellId.mIndex.mX; + return player->GetCell()->mData.mX; } int TranslocationFunctions::GetExteriorY(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); - return player->GetCell()->mCellId.mIndex.mY; + return player->GetCell()->mData.mY; } bool TranslocationFunctions::IsInExterior(unsigned short pid) noexcept diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index 271b556ae..022ade342 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -427,7 +427,7 @@ void DedicatedPlayer::updateCell() MWWorld::CellStore *cellStore; if (cell.isExterior() == 1) - cellStore = world->getExterior(cell.mCellId.mIndex.mX, cell.mCellId.mIndex.mY); + cellStore = world->getExterior(cell.mData.mX, cell.mData.mY); else if (!cell.mName.empty()) cellStore = world->getInterior(cell.mName); // Go no further if cell data is invalid diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 5fe974e42..041698db1 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -308,11 +308,11 @@ void LocalPlayer::updateCell(bool forceUpdate) } else if (ptrCell->isExterior()) { - if (ptrCell->mCellId.mIndex.mX != GetCell()->mCellId.mIndex.mX) + if (ptrCell->mData.mX != GetCell()->mData.mX) { shouldUpdate = true; } - else if (ptrCell->mCellId.mIndex.mY != GetCell()->mCellId.mIndex.mY) + else if (ptrCell->mData.mY != GetCell()->mData.mY) { shouldUpdate = true; } @@ -613,8 +613,8 @@ void LocalPlayer::setCell() world->getPlayer().setTeleported(true); - int x = GetCell()->mCellId.mIndex.mX; - int y = GetCell()->mCellId.mIndex.mY; + int x = GetCell()->mData.mX; + int y = GetCell()->mData.mY; if (GetCell()->isExterior()) { diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 752499b54..afa0ff799 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -661,10 +661,7 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) 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()); + event->cell.getDescription().c_str()); MWWorld::Ptr ptrFound = ptrCellStore->searchByRefNum(event->cellRef.mRefNum); diff --git a/apps/openmw/mwworld/actiontake.cpp b/apps/openmw/mwworld/actiontake.cpp index 9f86a9063..d057ad071 100644 --- a/apps/openmw/mwworld/actiontake.cpp +++ b/apps/openmw/mwworld/actiontake.cpp @@ -29,13 +29,10 @@ 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\n- cellRef: %s, %i\n- cell: %i, %i, %i, %s", + printf("Sending ID_WORLD_OBJECT_DELETE about\n- cellRef: %s, %i\n- cell: %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()); + event->cell.getDescription().c_str()); MWBase::Environment::get().getWorld()->deleteObject (getTarget()); } diff --git a/components/openmw-mp/Packets/Player/PacketCell.cpp b/components/openmw-mp/Packets/Player/PacketCell.cpp index 991774382..67b3ed43f 100644 --- a/components/openmw-mp/Packets/Player/PacketCell.cpp +++ b/components/openmw-mp/Packets/Player/PacketCell.cpp @@ -18,9 +18,7 @@ void mwmp::PacketCell::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, b PlayerPacket::Packet(bs, player, send); RW(player->GetCell()->mData.mFlags, send); - - RW(player->GetCell()->mCellId.mIndex.mX, send); - RW(player->GetCell()->mCellId.mIndex.mY, send); - + RW(player->GetCell()->mData.mX, send); + RW(player->GetCell()->mData.mY, send); RW(player->GetCell()->mName, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectDelete.cpp b/components/openmw-mp/Packets/World/PacketObjectDelete.cpp index aaac1e4bc..510f079c7 100644 --- a/components/openmw-mp/Packets/World/PacketObjectDelete.cpp +++ b/components/openmw-mp/Packets/World/PacketObjectDelete.cpp @@ -16,7 +16,7 @@ void PacketObjectDelete::Packet(RakNet::BitStream *bs, WorldEvent *event, bool s RW(event->cellRef.mRefNum.mIndex, send); RW(event->cell.mData.mFlags, send); - RW(event->cell.mCellId.mIndex.mX, send); - RW(event->cell.mCellId.mIndex.mY, send); + RW(event->cell.mData.mX, send); + RW(event->cell.mData.mY, send); RW(event->cell.mName, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectPlace.cpp b/components/openmw-mp/Packets/World/PacketObjectPlace.cpp index 52c96e177..d87907352 100644 --- a/components/openmw-mp/Packets/World/PacketObjectPlace.cpp +++ b/components/openmw-mp/Packets/World/PacketObjectPlace.cpp @@ -17,7 +17,7 @@ void PacketObjectPlace::Packet(RakNet::BitStream *bs, WorldEvent *event, bool se RW(event->cellRef.mPos, send); RW(event->cell.mData.mFlags, send); - RW(event->cell.mCellId.mIndex.mX, send); - RW(event->cell.mCellId.mIndex.mY, send); + RW(event->cell.mData.mX, send); + RW(event->cell.mData.mY, send); RW(event->cell.mName, send); }