ode uninitialized bugfix
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
3db24ef6c7
commit
7393c0b094
@ -43,6 +43,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;
|
||||
static float targetFramePeriod = 1.0f/targetFrameRate;
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user