mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:37:49 +02:00
tweak
This commit is contained in:
parent
54eac099b9
commit
8b72f6e7c6
2 changed files with 4 additions and 8 deletions
|
@ -65,9 +65,6 @@ void AvatarActionHold::updateActionWorker(float deltaTimeStep) {
|
||||||
gotLock = withTryWriteLock([&]{
|
gotLock = withTryWriteLock([&]{
|
||||||
if (_positionalTarget != position || _rotationalTarget != rotation) {
|
if (_positionalTarget != position || _rotationalTarget != rotation) {
|
||||||
auto ownerEntity = _ownerEntity.lock();
|
auto ownerEntity = _ownerEntity.lock();
|
||||||
if (ownerEntity) {
|
|
||||||
ownerEntity->setActionDataDirty(true);
|
|
||||||
}
|
|
||||||
_positionalTarget = position;
|
_positionalTarget = position;
|
||||||
_rotationalTarget = rotation;
|
_rotationalTarget = rotation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,11 +280,6 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastStep = simulationStep;
|
_lastStep = simulationStep;
|
||||||
|
|
||||||
if (_entity->shouldSuppressEdits()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (glm::length2(_serverVelocity) > 0.0f) {
|
if (glm::length2(_serverVelocity) > 0.0f) {
|
||||||
_serverVelocity += _serverAcceleration * dt;
|
_serverVelocity += _serverAcceleration * dt;
|
||||||
_serverVelocity *= powf(1.0f - _body->getLinearDamping(), dt);
|
_serverVelocity *= powf(1.0f - _body->getLinearDamping(), dt);
|
||||||
|
@ -296,6 +291,10 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_entity->shouldSuppressEdits()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Else we measure the error between current and extrapolated transform (according to expected behavior
|
// Else we measure the error between current and extrapolated transform (according to expected behavior
|
||||||
// of remote EntitySimulation) and return true if the error is significant.
|
// of remote EntitySimulation) and return true if the error is significant.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue