GetPlayerInfoForInput allows mapping inputs to PlayerInfos rather than just PlayerNumbers to PlayerInfos.
This commit is contained in:
@@ -47,7 +47,6 @@
|
|||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "DifficultyIcon.h"
|
#include "DifficultyIcon.h"
|
||||||
#include "DifficultyMeter.h"
|
#include "DifficultyMeter.h"
|
||||||
#include "InputEventPlus.h"
|
|
||||||
#include "XmlFile.h"
|
#include "XmlFile.h"
|
||||||
#include "Background.h"
|
#include "Background.h"
|
||||||
#include "Foreground.h"
|
#include "Foreground.h"
|
||||||
@@ -2194,7 +2193,7 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
|||||||
|
|
||||||
if( PREFSMAN->m_AutoPlay == PC_HUMAN )
|
if( PREFSMAN->m_AutoPlay == PC_HUMAN )
|
||||||
{
|
{
|
||||||
PlayerInfo& pi = PlayerNumberToPlayerInfo( input.StyleI.player );
|
PlayerInfo& pi = GetPlayerInfoForInput( input );
|
||||||
pi.m_pPlayer->Step( input.StyleI.col, input.DeviceI.ts );
|
pi.m_pPlayer->Step( input.StyleI.col, input.DeviceI.ts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "ThemeMetric.h"
|
#include "ThemeMetric.h"
|
||||||
#include "PlayerStageStats.h"
|
#include "PlayerStageStats.h"
|
||||||
#include "PlayerState.h"
|
#include "PlayerState.h"
|
||||||
#include "GameInput.h"
|
#include "InputEventPlus.h"
|
||||||
|
|
||||||
class LyricsLoader;
|
class LyricsLoader;
|
||||||
class ActiveAttackList;
|
class ActiveAttackList;
|
||||||
@@ -221,7 +221,7 @@ protected:
|
|||||||
|
|
||||||
vector<PlayerInfo> m_vPlayerInfo; // filled by SGameplay derivatives in Init
|
vector<PlayerInfo> m_vPlayerInfo; // filled by SGameplay derivatives in Init
|
||||||
virtual void FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut ) = 0;
|
virtual void FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut ) = 0;
|
||||||
virtual PlayerInfo &PlayerNumberToPlayerInfo( PlayerNumber pn ) { return m_vPlayerInfo[pn]; }
|
virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.StyleI.player]; }
|
||||||
};
|
};
|
||||||
|
|
||||||
vector<PlayerInfo>::iterator GetNextEnabledPlayerInfo ( vector<PlayerInfo>::iterator iter, vector<PlayerInfo> &v );
|
vector<PlayerInfo>::iterator GetNextEnabledPlayerInfo ( vector<PlayerInfo>::iterator iter, vector<PlayerInfo> &v );
|
||||||
|
|||||||
Reference in New Issue
Block a user