diff --git a/apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp b/apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp index 2086155ef..b1bf486b8 100644 --- a/apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp +++ b/apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp @@ -13,10 +13,6 @@ namespace mwmp public: virtual void Do(ObjectPacket &packet, ObjectList &objectList) { - ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); - - if (!ptrCellStore) return; - LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), objectList.cell.getDescription().c_str()); } protected: diff --git a/apps/openmw/mwmp/processors/object/ProcessorClientScriptLocal.hpp b/apps/openmw/mwmp/processors/object/ProcessorClientScriptLocal.hpp index 4061676a5..20cc5ecbe 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorClientScriptLocal.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorClientScriptLocal.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.setClientLocals(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorConsoleCommand.hpp b/apps/openmw/mwmp/processors/object/ProcessorConsoleCommand.hpp index c327c80b3..d727ba5ce 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorConsoleCommand.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorConsoleCommand.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.runConsoleCommands(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorContainer.hpp b/apps/openmw/mwmp/processors/object/ProcessorContainer.hpp index 62c8daec3..5b13dc650 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorContainer.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorContainer.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + std::string debugMessage = "- action "; unsigned char action = objectList.action; unsigned char containerSubAction = objectList.containerSubAction; diff --git a/apps/openmw/mwmp/processors/object/ProcessorDoorDestination.hpp b/apps/openmw/mwmp/processors/object/ProcessorDoorDestination.hpp index 47aef7050..90d2c2b3e 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorDoorDestination.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorDoorDestination.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.setDoorDestinations(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorDoorState.hpp b/apps/openmw/mwmp/processors/object/ProcessorDoorState.hpp index 419259509..8f8923879 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorDoorState.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorDoorState.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.activateDoors(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectActivate.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectActivate.hpp index c4920199c..8b443f96d 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectActivate.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectActivate.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.activateObjects(ptrCellStore); } diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectAnimPlay.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectAnimPlay.hpp index a5b085479..ded4582ca 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectAnimPlay.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectAnimPlay.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.animateObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectAttach.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectAttach.hpp index eccd4c74a..249363d79 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectAttach.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectAttach.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + //objectList.attachObjects(ptrCellStore); } diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectDelete.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectDelete.hpp index 0b5d091a9..a5259db95 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectDelete.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectDelete.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.deleteObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectHit.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectHit.hpp index 33d986c62..b8a08411b 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectHit.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectHit.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + //objectList.hitObjects(ptrCellStore); } diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectLock.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectLock.hpp index 7ed43423c..df1869661 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectLock.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectLock.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.lockObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectMiscellaneous.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectMiscellaneous.hpp index ff0ac3865..86342dfbb 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectMiscellaneous.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectMiscellaneous.hpp @@ -15,10 +15,12 @@ namespace mwmp virtual void Do(ObjectPacket &packet, ObjectList &objectList) { - LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str()); - BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.setGoldPoolsForObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectMove.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectMove.hpp index b5fc35231..5d60239f1 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectMove.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectMove.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.moveObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectPlace.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectPlace.hpp index 652738130..9e2df466c 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectPlace.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectPlace.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.placeObjects(ptrCellStore); } diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectRestock.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectRestock.hpp index 26e75a804..71177a78c 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectRestock.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectRestock.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.restockObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectRotate.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectRotate.hpp index 6dc6c8d5c..903280023 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectRotate.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectRotate.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.rotateObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectScale.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectScale.hpp index 3b669980e..795eb0e1f 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectScale.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectScale.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.scaleObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectSound.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectSound.hpp index f21415ee2..77e92f1f6 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectSound.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectSound.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.playObjectSounds(ptrCellStore); } diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectSpawn.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectSpawn.hpp index c242e86c0..52cb90e8c 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectSpawn.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectSpawn.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.spawnObjects(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectState.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectState.hpp index 880e26e2d..ba3eae186 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectState.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectState.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.setObjectStates(ptrCellStore); } }; diff --git a/apps/openmw/mwmp/processors/object/ProcessorObjectTrap.hpp b/apps/openmw/mwmp/processors/object/ProcessorObjectTrap.hpp index cbdbe1c5b..593d0f4c7 100644 --- a/apps/openmw/mwmp/processors/object/ProcessorObjectTrap.hpp +++ b/apps/openmw/mwmp/processors/object/ProcessorObjectTrap.hpp @@ -17,6 +17,10 @@ namespace mwmp { BaseObjectProcessor::Do(packet, objectList); + ptrCellStore = Main::get().getCellController()->getCellStore(objectList.cell); + + if (!ptrCellStore) return; + objectList.triggerTrapObjects(ptrCellStore); } };