fix reentrant locking bug
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-11-29 11:41:54 -05:00
parent ef8b070c88
commit 561576a758
2 changed files with 12 additions and 8 deletions

View File

@ -1166,6 +1166,7 @@ Fix particles not spawning in correct positions
(11/28/2024)
Fix block not firing
Fix reentrant locking bug
# TODO

View File

@ -747,6 +747,7 @@ public class CollisionEngine {
body.destroy();
} catch (NullPointerException ex){
LoggerInterface.loggerEngine.ERROR(ex);
spaceLock.unlock();
}
spaceLock.unlock();
}
@ -971,6 +972,7 @@ public class CollisionEngine {
* @param angularForce The angular force
*/
protected void synchronizeData(DBody body, Vector3d position, Quaterniond rotation, Vector3d linearVel, Vector3d angularVel, Vector3d linearForce, Vector3d angularForce){
if(body != null){
spaceLock.lock();
body.setPosition(position.x, position.y, position.z);
body.setQuaternion(PhysicsUtils.jomlQuatToOdeQuat(rotation));
@ -980,6 +982,7 @@ public class CollisionEngine {
body.setTorque(PhysicsUtils.jomlVecToOdeVec(angularForce));
spaceLock.unlock();
}
}
/**
* Sets the transform on a body