Merge pull request #453 from TES3MP/0.6.3 while resolving conflicts

Conflicts:
	apps/openmw-mp/Script/Functions/Objects.cpp
	apps/openmw-mp/Script/Functions/Objects.hpp
	apps/openmw-mp/Script/Functions/Worldstate.cpp
	apps/openmw-mp/Script/Functions/Worldstate.hpp
pull/454/head
David Cernat 7 years ago
commit 8b482e19ec

@ -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;

@ -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);

@ -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

@ -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()

@ -60,6 +60,8 @@ namespace mwmp
Target master;
bool hasMaster;
bool hasContainer;
std::vector<ContainerItem> containerItems;
unsigned int containerItemCount;

@ -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);
}

@ -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

Loading…
Cancel
Save