mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 18:34:54 +02:00
Avatar Sim Rate Display fix
Division by zero on first update was causing the displayed avatar simulation rate to be incorrect.
This commit is contained in:
parent
2c886658ba
commit
71f1be2b38
1 changed files with 3 additions and 1 deletions
|
@ -44,9 +44,11 @@ void AvatarUpdate::synchronousProcess() {
|
||||||
bool AvatarUpdate::process() {
|
bool AvatarUpdate::process() {
|
||||||
PerformanceTimer perfTimer("AvatarUpdate");
|
PerformanceTimer perfTimer("AvatarUpdate");
|
||||||
quint64 start = usecTimestampNow();
|
quint64 start = usecTimestampNow();
|
||||||
quint64 deltaMicroseconds = 0;
|
quint64 deltaMicroseconds = 10000;
|
||||||
if (_lastAvatarUpdate > 0) {
|
if (_lastAvatarUpdate > 0) {
|
||||||
deltaMicroseconds = start - _lastAvatarUpdate;
|
deltaMicroseconds = start - _lastAvatarUpdate;
|
||||||
|
} else {
|
||||||
|
deltaMicroseconds = 10000; // 10 ms
|
||||||
}
|
}
|
||||||
float deltaSeconds = (float) deltaMicroseconds / (float) USECS_PER_SECOND;
|
float deltaSeconds = (float) deltaMicroseconds / (float) USECS_PER_SECOND;
|
||||||
_lastAvatarUpdate = start;
|
_lastAvatarUpdate = start;
|
||||||
|
|
Loading…
Reference in a new issue