aboutsummaryrefslogtreecommitdiff
path: root/src/client/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/main.cpp')
-rw-r--r--src/client/main.cpp10
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);