aboutsummaryrefslogtreecommitdiff
path: root/src/client/main.cpp
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-08-05 18:34:24 -0400
committerAlexander Pickering <alex@cogarr.net>2018-08-05 18:34:24 -0400
commit2f814449ff099747e50e13a78503d4ce17920203 (patch)
tree53f230ad98acf1dfe4d9c9127b71afd5e3767699 /src/client/main.cpp
parent1d677927e73e2d66591738777f6a1559527dbab2 (diff)
downloadbrokengine-2f814449ff099747e50e13a78503d4ce17920203.tar.gz
brokengine-2f814449ff099747e50e13a78503d4ce17920203.tar.bz2
brokengine-2f814449ff099747e50e13a78503d4ce17920203.zip
Added data folder to lua path for client and server
Both the client and the server now look in their respective folders for ../data/?.lua when require() is called.
Diffstat (limited to 'src/client/main.cpp')
-rw-r--r--src/client/main.cpp2
1 files changed, 2 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);