ode uninitialized bugfix
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-09-05 17:49:16 -04:00
parent 3db24ef6c7
commit 7393c0b094

View File

@ -42,6 +42,11 @@ public class Main {
public static boolean running = true;
/**
* Tracks if ode has been initialized or not
*/
static boolean initOde = false;
//target amount of time per frame
public static float targetFrameRate = 60.0f;
@ -103,7 +108,10 @@ public class Main {
}
//init ODE
OdeHelper.initODE();
if(!initOde){
OdeHelper.initODE();
initOde = true;
}
//world gen testing
//gen terrain
@ -437,7 +445,9 @@ public class Main {
Globals.renderingEngine.clearGlobalState();
}
//used to signal threads to stop
Globals.threadManager.close();
if(Globals.threadManager != null){
Globals.threadManager.close();
}
//reset globals for good measure (making sure no long-running threads can re-inject entities into scenes)
Globals.resetGlobals();
//shut down audio engine
@ -449,7 +459,10 @@ public class Main {
Globals.netMonitor.close();
}
//shutdown ode
OdeHelper.closeODE();
if(initOde){
OdeHelper.closeODE();
initOde = false;
}
}
static void sleep(int i) {