From f723e70fa3a8f71fd293cb57c2c5bd75772ff7b9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 30 Aug 2005 01:59:15 +0000 Subject: [PATCH] GetPlayerState --- stepmania/src/GameState.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 4da73f986e..fb00625422 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1887,6 +1887,10 @@ public: static int GetPlayerDisplayName( T* p, lua_State *L ) { lua_pushstring(L, p->GetPlayerDisplayName((PlayerNumber)IArg(1)) ); return 1; } static int GetMasterPlayerNumber( T* p, lua_State *L ) { lua_pushnumber(L, p->m_MasterPlayerNumber ); return 1; } static int GetMultiplayer( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bMultiplayer); return 1; } + static int GetPlayerState( T* p, lua_State *L ) { + PlayerNumber pn = (PlayerNumber)IArg(1); + p->m_pPlayerState[pn]->PushSelf(L);return 1; } + static int ApplyGameCommand( T* p, lua_State *L ) { PlayerNumber pn = PLAYER_INVALID; @@ -2012,6 +2016,7 @@ public: ADD_METHOD( GetPlayerDisplayName ) ADD_METHOD( GetMasterPlayerNumber ) ADD_METHOD( GetMultiplayer ) + ADD_METHOD( GetPlayerState ) ADD_METHOD( ApplyGameCommand ) ADD_METHOD( GetCurrentSong ) ADD_METHOD( SetCurrentSong )