Converted the server's managers to singletons

This commit is contained in:
Kayne Ruse
2014-08-17 10:06:29 +10:00
parent ce97245131
commit e7ba097e6a
10 changed files with 40 additions and 87 deletions
+1 -8
View File
@@ -85,14 +85,7 @@ void ServerApplication::Init(int argc, char** argv) {
roomMgr.SetLuaState(luaState);
std::cout << "Internal managers set" << std::endl;
//register the "globals"
lua_pushstring(luaState, ROOM_MANAGER_PSEUDOINDEX);
lua_pushlightuserdata(luaState, &roomMgr);
lua_settable(luaState, LUA_REGISTRYINDEX);
std::cout << "Internal managers registered with lua" << std::endl;
std::cout << "Internal managers initialized" << std::endl;
//-------------------------
//Run the startup scripts