From 2f814449ff099747e50e13a78503d4ce17920203 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sun, 5 Aug 2018 18:34:24 -0400 Subject: 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. --- src/client/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client') 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); -- cgit v1.2.3-70-g09d2