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