aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/main.cpp2
-rw-r--r--src/server/main.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp
index 5462e31..b10b8ef 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -112,6 +112,8 @@ int main(int argc, char *argv[]){
phys_genesis();
//Create a new lua state, this gets shared everywhere
+ //Set the path for lua
+ putenv("LUA_PATH=../data/?.lua");
lua_State *state = luaL_newstate();
L = state;
printf("Created lua state at %p\n",L);
diff --git a/src/server/main.cpp b/src/server/main.cpp
index 89d6703..bd731c2 100644
--- a/src/server/main.cpp
+++ b/src/server/main.cpp
@@ -34,6 +34,8 @@ void gameloop(){
int main (){
printf("Brok[en]gine Server\n");
+
+ putenv("LUA_PATH=../data/?.lua");
L = luaL_newstate();
lua_newtable(L);