mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Revert to using avatar's _globalPosition for zone membership
According to Tony this should be the hip position, i.e. a joint pos in T-pose, not neccesarily OK root. Also SpatiallyNestable::WorldPos may depend on parent entity and so not known by mixer.
This commit is contained in:
parent
c4fd58eb3e
commit
da6ca38282
2 changed files with 2 additions and 5 deletions
|
@ -129,7 +129,7 @@ int AvatarMixerClientData::parseData(ReceivedMessage& message, const SlaveShared
|
|||
incrementNumOutOfOrderSends();
|
||||
}
|
||||
_lastReceivedSequenceNumber = sequenceNumber;
|
||||
glm::vec3 oldPosition = _avatar->getCentroidPosition();
|
||||
glm::vec3 oldPosition = _avatar->getClientGlobalPosition();
|
||||
bool oldHasPriority = _avatar->getHasPriority();
|
||||
|
||||
// compute the offset to the data payload
|
||||
|
@ -140,7 +140,7 @@ int AvatarMixerClientData::parseData(ReceivedMessage& message, const SlaveShared
|
|||
// Regardless of what the client says, restore the priority as we know it without triggering any update.
|
||||
_avatar->setHasPriorityWithoutTimestampReset(oldHasPriority);
|
||||
|
||||
auto newPosition = _avatar->getCentroidPosition();
|
||||
auto newPosition = _avatar->getClientGlobalPosition();
|
||||
if (newPosition != oldPosition || _avatar->getNeedsHeroCheck()) {
|
||||
EntityTree& entityTree = *slaveSharedData.entityTree;
|
||||
FindPriorityZone findPriorityZone { newPosition } ;
|
||||
|
|
|
@ -22,9 +22,6 @@ public:
|
|||
bool getNeedsHeroCheck() const { return _needsHeroCheck; }
|
||||
void setNeedsHeroCheck(bool needsHeroCheck = true)
|
||||
{ _needsHeroCheck = needsHeroCheck; }
|
||||
// Bounding-box World centre:
|
||||
glm::vec3 getCentroidPosition() const
|
||||
{ return getWorldPosition() + _globalBoundingBoxOffset; }
|
||||
|
||||
private:
|
||||
bool _needsHeroCheck { false };
|
||||
|
|
Loading…
Reference in a new issue