put ThisGameCommand in the global space, not in GameState's environment
This commit is contained in:
@@ -123,7 +123,7 @@ void ScreenSelectMaster::Init()
|
|||||||
|
|
||||||
Lua *L = LUA->Get();
|
Lua *L = LUA->Get();
|
||||||
mc.PushSelf( L );
|
mc.PushSelf( L );
|
||||||
GAMESTATE->m_Environment->Set( L, "ThisGameCommand" );
|
lua_setglobal( L, "ThisGameCommand" );
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
|
|
||||||
// init icon
|
// init icon
|
||||||
@@ -149,9 +149,7 @@ void ScreenSelectMaster::Init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
L = LUA->Get();
|
LUA->UnsetGlobal( "ThisGameCommand" );
|
||||||
GAMESTATE->m_Environment->Unset( L, "ThisGameCommand" );
|
|
||||||
LUA->Release( L );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user