mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[General] Rename WorldObject's pos into position for consistency
This commit is contained in:
parent
174f316787
commit
b6c3830ea0
6 changed files with 25 additions and 25 deletions
|
@ -84,32 +84,32 @@ int WorldFunctions::GetObjectLockLevel(unsigned int i) noexcept
|
|||
|
||||
double WorldFunctions::GetObjectPosX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[0];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.pos[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[1];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.pos[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectPosZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[2];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.pos[2];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotX(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[0];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.rot[0];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotY(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[1];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.rot[1];
|
||||
}
|
||||
|
||||
double WorldFunctions::GetObjectRotZ(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.rot[2];
|
||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).position.rot[2];
|
||||
}
|
||||
|
||||
unsigned int WorldFunctions::GetContainerChangesSize(unsigned int objectIndex) noexcept
|
||||
|
@ -217,16 +217,16 @@ void WorldFunctions::SetObjectLockLevel(int lockLevel) noexcept
|
|||
|
||||
void WorldFunctions::SetObjectPosition(double x, double y, double z) noexcept
|
||||
{
|
||||
tempWorldObject.pos.pos[0] = x;
|
||||
tempWorldObject.pos.pos[1] = y;
|
||||
tempWorldObject.pos.pos[2] = z;
|
||||
tempWorldObject.position.pos[0] = x;
|
||||
tempWorldObject.position.pos[1] = y;
|
||||
tempWorldObject.position.pos[2] = z;
|
||||
}
|
||||
|
||||
void WorldFunctions::SetObjectRotation(double x, double y, double z) noexcept
|
||||
{
|
||||
tempWorldObject.pos.rot[0] = x;
|
||||
tempWorldObject.pos.rot[1] = y;
|
||||
tempWorldObject.pos.rot[2] = z;
|
||||
tempWorldObject.position.rot[0] = x;
|
||||
tempWorldObject.position.rot[1] = y;
|
||||
tempWorldObject.position.rot[2] = z;
|
||||
}
|
||||
|
||||
void WorldFunctions::SetContainerItemRefId(const char* refId) noexcept
|
||||
|
|
|
@ -146,7 +146,7 @@ void WorldEvent::placeObjects(MWWorld::CellStore* cellStore)
|
|||
newPtr.getCellRef().setMpNum(worldObject.mpNum);
|
||||
|
||||
newPtr.getCellRef().setGoldValue(worldObject.goldValue);
|
||||
newPtr = MWBase::Environment::get().getWorld()->placeObject(newPtr, cellStore, worldObject.pos);
|
||||
newPtr = MWBase::Environment::get().getWorld()->placeObject(newPtr, cellStore, worldObject.position);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,8 +255,8 @@ void WorldEvent::moveObjects(MWWorld::CellStore* cellStore)
|
|||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s, %i, %i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptrFound, worldObject.pos.pos[0], worldObject.pos.pos[1],
|
||||
worldObject.pos.pos[2]);
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptrFound, worldObject.position.pos[0], worldObject.position.pos[1],
|
||||
worldObject.position.pos[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ void WorldEvent::rotateObjects(MWWorld::CellStore* cellStore)
|
|||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::Environment::get().getWorld()->rotateObject(ptrFound,
|
||||
worldObject.pos.rot[0], worldObject.pos.rot[1], worldObject.pos.rot[2]);
|
||||
worldObject.position.rot[0], worldObject.position.rot[1], worldObject.position.rot[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ void WorldEvent::sendObjectPlace(MWWorld::Ptr ptr)
|
|||
|
||||
// Make sure we send the RefData position instead of the CellRef one, because that's what
|
||||
// we actually see on this client
|
||||
worldObject.pos = ptr.getRefData().getPosition();
|
||||
worldObject.position = ptr.getRefData().getPosition();
|
||||
|
||||
// We have to get the count from the dropped object because it gets changed
|
||||
// automatically for stacks of gold
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace mwmp
|
|||
int charge;
|
||||
int goldValue;
|
||||
|
||||
ESM::Position pos;
|
||||
ESM::Position position;
|
||||
|
||||
int drawState;
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ void PacketObjectMove::Packet(RakNet::BitStream *bs, bool send)
|
|||
RW(worldObject.refId, send);
|
||||
RW(worldObject.refNumIndex, send);
|
||||
RW(worldObject.mpNum, send);
|
||||
RW(worldObject.pos.pos[0], send);
|
||||
RW(worldObject.pos.pos[1], send);
|
||||
RW(worldObject.pos.pos[2], send);
|
||||
RW(worldObject.position.pos[0], send);
|
||||
RW(worldObject.position.pos[1], send);
|
||||
RW(worldObject.position.pos[2], send);
|
||||
|
||||
if (!send)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ void PacketObjectPlace::Packet(RakNet::BitStream *bs, bool send)
|
|||
RW(worldObject.count, send);
|
||||
RW(worldObject.charge, send);
|
||||
RW(worldObject.goldValue, send);
|
||||
RW(worldObject.pos, send);
|
||||
RW(worldObject.position, send);
|
||||
|
||||
if (!send)
|
||||
{
|
||||
|
|
|
@ -36,9 +36,9 @@ void PacketObjectRotate::Packet(RakNet::BitStream *bs, bool send)
|
|||
RW(worldObject.refId, send);
|
||||
RW(worldObject.refNumIndex, send);
|
||||
RW(worldObject.mpNum, send);
|
||||
RW(worldObject.pos.rot[0], send);
|
||||
RW(worldObject.pos.rot[1], send);
|
||||
RW(worldObject.pos.rot[2], send);
|
||||
RW(worldObject.position.rot[0], send);
|
||||
RW(worldObject.position.rot[1], send);
|
||||
RW(worldObject.position.rot[2], send);
|
||||
|
||||
if (!send)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue