mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-01 22:51:34 +00:00
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
This commit is contained in:
commit
8b482e19ec
7 changed files with 30 additions and 3 deletions
|
@ -28,6 +28,7 @@ void Object::Init(LuaState &lua)
|
||||||
"state", sol::property(&Object::getState, &Object::setState),
|
"state", sol::property(&Object::getState, &Object::setState),
|
||||||
"lockLevel", sol::property(&Object::getLockLevel, &Object::setLockLevel),
|
"lockLevel", sol::property(&Object::getLockLevel, &Object::setLockLevel),
|
||||||
"doorState", sol::property(&Object::getDoorState, &Object::setDoorState),
|
"doorState", sol::property(&Object::getDoorState, &Object::setDoorState),
|
||||||
|
"hasContainer", &Object::hasContainer,
|
||||||
"setTeleportState", &Object::setTeleportState,
|
"setTeleportState", &Object::setTeleportState,
|
||||||
"setDoorDestination", &Object::setDoorDestination,
|
"setDoorDestination", &Object::setDoorDestination,
|
||||||
"setDisarmState", &Object::setDisarmState,
|
"setDisarmState", &Object::setDisarmState,
|
||||||
|
@ -217,6 +218,11 @@ void Object::setLockLevel(int locklevel)
|
||||||
object.lockLevel = locklevel;
|
object.lockLevel = locklevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Object::hasContainer() const
|
||||||
|
{
|
||||||
|
return object.hasContainer;
|
||||||
|
}
|
||||||
|
|
||||||
void Object::setTeleportState(bool state)
|
void Object::setTeleportState(bool state)
|
||||||
{
|
{
|
||||||
changedDoorDestination = true;
|
changedDoorDestination = true;
|
||||||
|
|
|
@ -80,6 +80,8 @@ public:
|
||||||
int getLockLevel() const;
|
int getLockLevel() const;
|
||||||
void setLockLevel(int locklevel);
|
void setLockLevel(int locklevel);
|
||||||
|
|
||||||
|
bool hasContainer() const;
|
||||||
|
|
||||||
void setTeleportState(bool state);
|
void setTeleportState(bool state);
|
||||||
void setDoorDestination(const std::string &cellDescription, float posX, float posY, float posZ, float rotX, float rotY, float rotZ);
|
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.enchantmentCharge = itemPtr.getCellRef().getEnchantmentCharge();
|
||||||
containerItem.actionCount = actionCount;
|
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);
|
baseObject.containerItems.push_back(containerItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectList::addEntireContainer(const MWWorld::Ptr& ptr)
|
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());
|
ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum());
|
||||||
|
|
||||||
MWWorld::ContainerStore& containerStore = ptr.getClass().getContainerStore(ptr);
|
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.charge = ptr.getCellRef().getCharge();
|
||||||
baseObject.enchantmentCharge = ptr.getCellRef().getEnchantmentCharge();
|
baseObject.enchantmentCharge = ptr.getCellRef().getEnchantmentCharge();
|
||||||
baseObject.droppedByPlayer = droppedByPlayer;
|
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
|
// Make sure we send the RefData position instead of the CellRef one, because that's what
|
||||||
// we actually see on this client
|
// we actually see on this client
|
||||||
|
|
|
@ -253,7 +253,19 @@ namespace MWRender
|
||||||
, mMinY(0), mMaxY(0)
|
, 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()
|
GlobalMap::~GlobalMap()
|
||||||
|
|
|
@ -60,6 +60,8 @@ namespace mwmp
|
||||||
Target master;
|
Target master;
|
||||||
bool hasMaster;
|
bool hasMaster;
|
||||||
|
|
||||||
|
bool hasContainer;
|
||||||
|
|
||||||
std::vector<ContainerItem> containerItems;
|
std::vector<ContainerItem> containerItems;
|
||||||
unsigned int containerItemCount;
|
unsigned int containerItemCount;
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,5 @@ void PacketObjectPlace::Object(BaseObject &baseObject, bool send)
|
||||||
RW(baseObject.goldValue, send);
|
RW(baseObject.goldValue, send);
|
||||||
RW(baseObject.position, send);
|
RW(baseObject.position, send);
|
||||||
RW(baseObject.droppedByPlayer, send);
|
RW(baseObject.droppedByPlayer, send);
|
||||||
|
RW(baseObject.hasContainer, send);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,10 @@ Special thanks (in alphabetical order)
|
||||||
Lewis Sadlier
|
Lewis Sadlier
|
||||||
Luc Keating
|
Luc Keating
|
||||||
Michael Zagar (Zoops)
|
Michael Zagar (Zoops)
|
||||||
|
Nac
|
||||||
|
NicholasAH (Jónas Hafthorsson)
|
||||||
Olaxan
|
Olaxan
|
||||||
|
ppsychrite
|
||||||
psi29a
|
psi29a
|
||||||
Rhiyo
|
Rhiyo
|
||||||
Scorcio
|
Scorcio
|
||||||
|
|
Loading…
Reference in a new issue