put ThisGameCommand in the global space, not in GameState's environment

This commit is contained in:
Chris Danford
2005-08-15 07:48:16 +00:00
parent cf695ce313
commit 6eaf17dd25
+2 -4
View File
@@ -123,7 +123,7 @@ void ScreenSelectMaster::Init()
Lua *L = LUA->Get();
mc.PushSelf( L );
GAMESTATE->m_Environment->Set( L, "ThisGameCommand" );
lua_setglobal( L, "ThisGameCommand" );
LUA->Release( L );
// init icon
@@ -149,9 +149,7 @@ void ScreenSelectMaster::Init()
}
}
L = LUA->Get();
GAMESTATE->m_Environment->Unset( L, "ThisGameCommand" );
LUA->Release( L );
LUA->UnsetGlobal( "ThisGameCommand" );
}