From 3bbc1695f48e2b450023b96abdc26a0ce894f4cf Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 23 Jun 2018 21:59:52 -0600 Subject: Adjusted client to fail if logger is not found --- src/client/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/main.cpp b/src/client/main.cpp index 9c22567..ad7d818 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -5,7 +5,6 @@ extern "C" { #include #include } -#define _IRR_STATIC_LIB_ #include #include @@ -111,9 +110,10 @@ int setbackgroundcolor(lua_State* L){ int main(int argc, char *argv[]){ printf("Brok[en]gine Client\n"); + // Initialize bullet phys_genesis(); - + //Create a new lua state, this gets shared everywhere lua_State *state = luaL_newstate(); L = state; @@ -121,10 +121,12 @@ int main(int argc, char *argv[]){ loadLLibs(state); //Defined in initdevice.cpp, creates the irrlicht device device = spawnIrrDevice(state); + if (!device){ + printf("Failed to initalize device\n"); + return 1; + } ILogger* log = device->getLogger(); log->setLogLevel(ELL_NONE); - if (!device) - return 1; //Loads libraries for interfaceing with irrlicht loadIrrLibs(state,device); loadNetLibs(state); -- cgit v1.2.3-70-g09d2