diff --git a/apps/openmw-mp/Object.cpp b/apps/openmw-mp/Object.cpp index d207bc01c..e6506fcdd 100644 --- a/apps/openmw-mp/Object.cpp +++ b/apps/openmw-mp/Object.cpp @@ -28,6 +28,7 @@ void Object::Init(LuaState &lua) "state", sol::property(&Object::getState, &Object::setState), "lockLevel", sol::property(&Object::getLockLevel, &Object::setLockLevel), "doorState", sol::property(&Object::getDoorState, &Object::setDoorState), + "hasContainer", &Object::hasContainer, "setTeleportState", &Object::setTeleportState, "setDoorDestination", &Object::setDoorDestination, "setDisarmState", &Object::setDisarmState, @@ -217,6 +218,11 @@ void Object::setLockLevel(int locklevel) object.lockLevel = locklevel; } +bool Object::hasContainer() const +{ + return object.hasContainer; +} + void Object::setTeleportState(bool state) { changedDoorDestination = true; diff --git a/apps/openmw-mp/Object.hpp b/apps/openmw-mp/Object.hpp index eda71483e..e6797fcb4 100644 --- a/apps/openmw-mp/Object.hpp +++ b/apps/openmw-mp/Object.hpp @@ -80,6 +80,8 @@ public: int getLockLevel() const; void setLockLevel(int locklevel); + bool hasContainer() const; + void setTeleportState(bool state); void setDoorDestination(const std::string &cellDescription, float posX, float posY, float posZ, float rotX, float rotY, float rotZ); diff --git a/apps/openmw/mwmp/ObjectList.cpp b/apps/openmw/mwmp/ObjectList.cpp index b83e16116..a4d62717c 100644 --- a/apps/openmw/mwmp/ObjectList.cpp +++ b/apps/openmw/mwmp/ObjectList.cpp @@ -75,14 +75,14 @@ void ObjectList::addContainerItem(mwmp::BaseObject& baseObject, const MWWorld::P containerItem.enchantmentCharge = itemPtr.getCellRef().getEnchantmentCharge(); containerItem.actionCount = actionCount; - LOG_APPEND(Log::LOG_INFO, "--- Adding container item %s", containerItem.refId.c_str()); + LOG_APPEND(Log::LOG_VERBOSE, "--- Adding container item %s", containerItem.refId.c_str()); baseObject.containerItems.push_back(containerItem); } void ObjectList::addEntireContainer(const MWWorld::Ptr& ptr) { - LOG_APPEND(Log::LOG_INFO, "-- Adding entire container %s %i-%i", ptr.getCellRef().getRefId().c_str(), + LOG_APPEND(Log::LOG_VERBOSE, "-- Adding entire container %s %i-%i", ptr.getCellRef().getRefId().c_str(), ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum()); MWWorld::ContainerStore& containerStore = ptr.getClass().getContainerStore(ptr); @@ -800,6 +800,7 @@ void ObjectList::addObjectPlace(const MWWorld::Ptr& ptr, bool droppedByPlayer) baseObject.charge = ptr.getCellRef().getCharge(); baseObject.enchantmentCharge = ptr.getCellRef().getEnchantmentCharge(); baseObject.droppedByPlayer = droppedByPlayer; + baseObject.hasContainer = ptr.getClass().hasContainerStore(ptr); // Make sure we send the RefData position instead of the CellRef one, because that's what // we actually see on this client diff --git a/apps/openmw/mwrender/globalmap.cpp b/apps/openmw/mwrender/globalmap.cpp index 7f088b94e..0f6b0d47a 100644 --- a/apps/openmw/mwrender/globalmap.cpp +++ b/apps/openmw/mwrender/globalmap.cpp @@ -253,7 +253,19 @@ namespace MWRender , mMinY(0), mMaxY(0) { - mCellSize = Settings::Manager::getInt("global map cell size", "Map"); + /* + Start of tes3mp change (major) + + We need map tiles to have consistent sizes, because the server's map + is gradually filled in through tiles sent by players via WorldMap packets + + As a result, the default value is enforced for the time being + */ + //mCellSize = Settings::Manager::getInt("global map cell size", "Map"); + mCellSize = 18; + /* + End of tes3mp change (major) + */ } GlobalMap::~GlobalMap() diff --git a/components/openmw-mp/Base/BaseObject.hpp b/components/openmw-mp/Base/BaseObject.hpp index e34dcd39d..35bd6687a 100644 --- a/components/openmw-mp/Base/BaseObject.hpp +++ b/components/openmw-mp/Base/BaseObject.hpp @@ -60,6 +60,8 @@ namespace mwmp Target master; bool hasMaster; + bool hasContainer; + std::vector containerItems; unsigned int containerItemCount; diff --git a/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp b/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp index 2c65bee41..a9d3820ac 100644 --- a/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp @@ -18,4 +18,5 @@ void PacketObjectPlace::Object(BaseObject &baseObject, bool send) RW(baseObject.goldValue, send); RW(baseObject.position, send); RW(baseObject.droppedByPlayer, send); + RW(baseObject.hasContainer, send); } diff --git a/tes3mp-credits.md b/tes3mp-credits.md index 6811a9bc1..13c26712f 100644 --- a/tes3mp-credits.md +++ b/tes3mp-credits.md @@ -60,7 +60,10 @@ Special thanks (in alphabetical order) Lewis Sadlier Luc Keating Michael Zagar (Zoops) + Nac + NicholasAH (Jónas Hafthorsson) Olaxan + ppsychrite psi29a Rhiyo Scorcio