mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 12:12:39 +02:00
Merge pull request #13998 from AndrewMeadows/dont-zero-kinematic
don't zero kinematic velocities when releasing simulation ownership
This commit is contained in:
commit
49e578ebef
2 changed files with 3 additions and 3 deletions
|
@ -446,8 +446,9 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationStep) {
|
|||
|
||||
void EntityMotionState::updateSendVelocities() {
|
||||
if (!_body->isActive()) {
|
||||
// make sure all derivatives are zero
|
||||
clearObjectVelocities();
|
||||
if (!_body->isKinematicObject()) {
|
||||
clearObjectVelocities();
|
||||
}
|
||||
// we pretend we sent the inactive update for this object
|
||||
_numInactiveUpdates = 1;
|
||||
} else {
|
||||
|
|
|
@ -138,7 +138,6 @@ void PhysicalEntitySimulation::changeEntityInternal(EntityItemPointer entity) {
|
|||
btRigidBody* body = motionState->getRigidBody();
|
||||
if (body) {
|
||||
body->forceActivationState(ISLAND_SLEEPING);
|
||||
motionState->updateSendVelocities(); // has side-effect of zeroing entity velocities for inactive body
|
||||
}
|
||||
|
||||
// send packet to remove ownership
|
||||
|
|
Loading…
Reference in a new issue