fix reentrant locking bug
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
ef8b070c88
commit
561576a758
@ -1166,6 +1166,7 @@ Fix particles not spawning in correct positions
|
|||||||
|
|
||||||
(11/28/2024)
|
(11/28/2024)
|
||||||
Fix block not firing
|
Fix block not firing
|
||||||
|
Fix reentrant locking bug
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|||||||
@ -747,6 +747,7 @@ public class CollisionEngine {
|
|||||||
body.destroy();
|
body.destroy();
|
||||||
} catch (NullPointerException ex){
|
} catch (NullPointerException ex){
|
||||||
LoggerInterface.loggerEngine.ERROR(ex);
|
LoggerInterface.loggerEngine.ERROR(ex);
|
||||||
|
spaceLock.unlock();
|
||||||
}
|
}
|
||||||
spaceLock.unlock();
|
spaceLock.unlock();
|
||||||
}
|
}
|
||||||
@ -971,14 +972,16 @@ public class CollisionEngine {
|
|||||||
* @param angularForce The angular force
|
* @param angularForce The angular force
|
||||||
*/
|
*/
|
||||||
protected void synchronizeData(DBody body, Vector3d position, Quaterniond rotation, Vector3d linearVel, Vector3d angularVel, Vector3d linearForce, Vector3d angularForce){
|
protected void synchronizeData(DBody body, Vector3d position, Quaterniond rotation, Vector3d linearVel, Vector3d angularVel, Vector3d linearForce, Vector3d angularForce){
|
||||||
spaceLock.lock();
|
if(body != null){
|
||||||
body.setPosition(position.x, position.y, position.z);
|
spaceLock.lock();
|
||||||
body.setQuaternion(PhysicsUtils.jomlQuatToOdeQuat(rotation));
|
body.setPosition(position.x, position.y, position.z);
|
||||||
body.setLinearVel(PhysicsUtils.jomlVecToOdeVec(linearVel));
|
body.setQuaternion(PhysicsUtils.jomlQuatToOdeQuat(rotation));
|
||||||
body.setAngularVel(PhysicsUtils.jomlVecToOdeVec(angularVel));
|
body.setLinearVel(PhysicsUtils.jomlVecToOdeVec(linearVel));
|
||||||
body.setForce(PhysicsUtils.jomlVecToOdeVec(linearForce));
|
body.setAngularVel(PhysicsUtils.jomlVecToOdeVec(angularVel));
|
||||||
body.setTorque(PhysicsUtils.jomlVecToOdeVec(angularForce));
|
body.setForce(PhysicsUtils.jomlVecToOdeVec(linearForce));
|
||||||
spaceLock.unlock();
|
body.setTorque(PhysicsUtils.jomlVecToOdeVec(angularForce));
|
||||||
|
spaceLock.unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user