mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-10 03:53:15 +02:00
hacking
This commit is contained in:
parent
02c0700db3
commit
83d1cc911a
2 changed files with 6 additions and 2 deletions
|
@ -562,8 +562,10 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
||||||
// was at that last known positition.
|
// was at that last known positition.
|
||||||
|
|
||||||
float skipTimeForward = (float)(now - _lastSimulated) / (float)(USECS_PER_SECOND);
|
float skipTimeForward = (float)(now - _lastSimulated) / (float)(USECS_PER_SECOND);
|
||||||
qDebug() << "skipTimeForward:" << skipTimeForward;
|
if (skipTimeForward > 0.0f) {
|
||||||
simulateKinematicMotion(skipTimeForward);
|
qDebug() << "skipTimeForward:" << skipTimeForward;
|
||||||
|
simulateKinematicMotion(skipTimeForward);
|
||||||
|
}
|
||||||
//simulate(now);
|
//simulate(now);
|
||||||
_lastSimulated = now;
|
_lastSimulated = now;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,8 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) {
|
||||||
// DANGER! EntityItem stores angularVelocity in degrees/sec!!!
|
// DANGER! EntityItem stores angularVelocity in degrees/sec!!!
|
||||||
_entity->setAngularVelocity(glm::degrees(v));
|
_entity->setAngularVelocity(glm::degrees(v));
|
||||||
|
|
||||||
|
_entity->setLastSimulated(usecTimestampNow());
|
||||||
|
|
||||||
_outgoingPacketFlags = DIRTY_PHYSICS_FLAGS;
|
_outgoingPacketFlags = DIRTY_PHYSICS_FLAGS;
|
||||||
EntityMotionState::enqueueOutgoingEntity(_entity);
|
EntityMotionState::enqueueOutgoingEntity(_entity);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue