diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-06-23 21:59:52 -0600 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-06-23 21:59:52 -0600 |
| commit | 3bbc1695f48e2b450023b96abdc26a0ce894f4cf (patch) | |
| tree | 20a6d239838dc68e9e1e1d13f766457b67c8d3d6 /src/client | |
| parent | 101d9b7ac8b3ae03a87364dc464fa7de36fbccf1 (diff) | |
| download | brokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.tar.gz brokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.tar.bz2 brokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.zip | |
Adjusted client to fail if logger is not found
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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 <lauxlib.h> #include <lualib.h> } -#define _IRR_STATIC_LIB_ #include <irrlicht.h> #include <chrono> @@ -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); |
