From 83a85531ae789e2f30da2379990899f815f53ff1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Feb 2019 18:16:04 -0500 Subject: Added new element, added server-specific code for networking Added a new element for client gui: iguicombobox Added a part of the engine specifically for the server so server is no longer just a stripped down client --- src/server/lua_api/load_game.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/server/lua_api/load_game.cpp (limited to 'src/server/lua_api/load_game.cpp') diff --git a/src/server/lua_api/load_game.cpp b/src/server/lua_api/load_game.cpp new file mode 100644 index 0000000..4464dd7 --- /dev/null +++ b/src/server/lua_api/load_game.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +extern "C" { + #include + #include + #include +} + +extern bool game_active; + +//exit() +int exit_game(lua_State *L){ + game_active = false; + return 0; +} + +void load_gamefuncs(lua_State* L){ + lua_newtable(L); + lua_setglobal(L,"GAME"); + + lua_getglobal(L,"GAME"); + lua_pushcfunction(L,exit_game); + lua_setfield(L,-2,"exit"); + lua_pop(L,1); +} -- cgit v1.2.3-70-g09d2