Change the style after you change the steps with

SetCurrentSteps( PlayerNumber pn, Steps steps ) lua binding
This commit is contained in:
Marcio Barrientos
2012-01-07 17:26:18 -06:00
parent dcf0155fa3
commit 4fd32f1259
+1
View File
@@ -2205,6 +2205,7 @@ public:
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set( NULL ); }
else { Steps *pS = Luna<Steps>::check(L,2); p->m_pCurSteps[pn].Set( pS ); }
GAMESTATE->SetCurrentStyle( GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), p->m_pCurSteps[pn]->m_StepsType ));
// Why Broadcast again? This is double-broadcasting. -Chris
MESSAGEMAN->Broadcast( (MessageID)(Message_CurrentStepsP1Changed+pn) );