updatePosition now setPosition

This commit is contained in:
ZappoMan 2017-11-02 15:58:50 -07:00
parent afaad5fcd7
commit 53c6eeb58b
2 changed files with 4 additions and 5 deletions

View file

@ -735,7 +735,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
// reasons and the contract is that the client handles them in an idempotent manner.
auto customUpdatePositionFromNetwork = [this, shouldUpdate, lastEdited](glm::vec3 value){
if (shouldUpdate(_lastUpdatedPositionTimestamp, value != _lastUpdatedPositionValue)) {
updatePosition(value);
setPosition(value);
_lastUpdatedPositionTimestamp = lastEdited;
_lastUpdatedPositionValue = value;
}
@ -1316,7 +1316,7 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) {
// these affect TerseUpdate properties
SET_ENTITY_PROPERTY_FROM_PROPERTIES(simulationOwner, setSimulationOwner);
SET_ENTITY_PROPERTY_FROM_PROPERTIES(position, updatePosition);
SET_ENTITY_PROPERTY_FROM_PROPERTIES(position, setPosition);
SET_ENTITY_PROPERTY_FROM_PROPERTIES(rotation, setRotation);
SET_ENTITY_PROPERTY_FROM_PROPERTIES(velocity, setVelocity);
SET_ENTITY_PROPERTY_FROM_PROPERTIES(angularVelocity, setAngularVelocity);
@ -1691,7 +1691,7 @@ void EntityItem::setRegistrationPoint(const glm::vec3& value) {
}
}
void EntityItem::updatePosition(const glm::vec3& value) {
void EntityItem::setPosition(const glm::vec3& value) {
if (getLocalPosition() != value) {
setLocalPosition(value);

View file

@ -347,8 +347,7 @@ public:
virtual void setCollisionShape(const btCollisionShape* shape) {}
// updateFoo() methods to be used when changes need to be accumulated in the _dirtyFlags
void updatePosition(const glm::vec3& value);
void setPosition(const glm::vec3& value);
virtual void setParentID(const QUuid& parentID);
virtual void setRotation(glm::quat orientation);
virtual void setVelocity(const glm::vec3& velocity);