mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +02:00
debug cleanup and change to Particle::update() to handle clock skew slightly better
This commit is contained in:
parent
26366e9fe7
commit
864fc10d3a
1 changed files with 2 additions and 2 deletions
|
@ -424,7 +424,7 @@ bool Particle::encodeParticleEditMessageDetails(PACKET_TYPE command, int count,
|
|||
void Particle::update() {
|
||||
|
||||
uint64_t now = usecTimestampNow();
|
||||
uint64_t elapsed = now - _lastUpdated;
|
||||
int elapsed = now - _lastUpdated; // making this signed slightly improves clock skew behavior
|
||||
float timeElapsed = (float)((float)elapsed/(float)USECS_PER_SECOND);
|
||||
|
||||
|
||||
|
@ -438,7 +438,7 @@ void Particle::update() {
|
|||
bool shouldDie = !isInHand && !isStillMoving && isReallyOld;
|
||||
setShouldDie(shouldDie);
|
||||
|
||||
bool wantDebug = false;
|
||||
const bool wantDebug = false;
|
||||
if (wantDebug) {
|
||||
printf("Particle::update()... timeElapsed: %f lifeTime:%f editedAgo:%f "
|
||||
"isInHand:%s isStillMoveing:%s isReallyOld:%s shouldDie:%s\n",
|
||||
|
|
Loading…
Reference in a new issue