[ScreenGameplay] When ShowLifeMeterForDisabledPlayers is true, don't fill up life in the meter for the disabled player. (LifeMeterBar only)
This commit is contained in:
@@ -11,6 +11,8 @@ StepMania 5.0 ???? ?? | 20120???
|
|||||||
2012/07/03
|
2012/07/03
|
||||||
----------
|
----------
|
||||||
* [ScreenHowToPlay] Actually shows notes again. [AJ]
|
* [ScreenHowToPlay] Actually shows notes again. [AJ]
|
||||||
|
* [ScreenGameplay] When ShowLifeMeterForDisabledPlayers is true, don't fill up
|
||||||
|
life in the meter for the disabled player. (LifeMeterBar only) [AJ]
|
||||||
|
|
||||||
2012/07/02
|
2012/07/02
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "LifeMeter.h"
|
#include "LifeMeter.h"
|
||||||
|
#include "LifeMeterBar.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "ScoreDisplayNormal.h"
|
#include "ScoreDisplayNormal.h"
|
||||||
#include "ScoreDisplayPercentage.h"
|
#include "ScoreDisplayPercentage.h"
|
||||||
@@ -559,6 +560,16 @@ void ScreenGameplay::Init()
|
|||||||
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_pLifeMeter );
|
LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_pLifeMeter );
|
||||||
this->AddChild( pi->m_pLifeMeter );
|
this->AddChild( pi->m_pLifeMeter );
|
||||||
|
|
||||||
|
// HACK: When SHOW_LIFE_METER_FOR_DISABLED_PLAYERS is enabled,
|
||||||
|
// we don't want to have any life in the disabled player's life
|
||||||
|
// meter. I think this only happens with LifeMeterBars, but I'm
|
||||||
|
// not 100% sure of that. -freem
|
||||||
|
if( !GAMESTATE->IsPlayerEnabled(pi->m_pn) && SHOW_LIFE_METER_FOR_DISABLED_PLAYERS )
|
||||||
|
{
|
||||||
|
if(GAMESTATE->m_SongOptions.GetStage().m_LifeType == SongOptions::LIFE_BAR)
|
||||||
|
static_cast<LifeMeterBar*>(pi->m_pLifeMeter)->ChangeLife(-1.0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
|
|||||||
Reference in New Issue
Block a user