Use Step Timing if steps are already on Splits.
This commit is contained in:
@@ -733,6 +733,10 @@ void ScreenEdit::Init()
|
||||
|
||||
m_pSong = GAMESTATE->m_pCurSong;
|
||||
m_pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
|
||||
if( m_pSteps->UsesSplitTiming() )
|
||||
GAMESTATE->m_bIsUsingStepTiming = true;
|
||||
|
||||
m_bReturnToRecordMenuAfterPlay = false;
|
||||
m_fBeatToReturnTo = 0;
|
||||
|
||||
|
||||
+7
-8
@@ -424,6 +424,12 @@ void Steps::SetCachedRadarValues( const RadarValues v[NUM_PLAYERS] )
|
||||
copy( v, v + NUM_PLAYERS, m_CachedRadarValues );
|
||||
}
|
||||
|
||||
bool Steps::UsesSplitTiming() const
|
||||
{
|
||||
Song *song = SONGMAN->GetSongFromSteps(const_cast<Steps *>(this));
|
||||
return song->m_SongTiming != this->m_Timing;
|
||||
}
|
||||
|
||||
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
@@ -441,6 +447,7 @@ public:
|
||||
DEFINE_METHOD( IsAutogen, IsAutogen() )
|
||||
DEFINE_METHOD( IsAnEdit, IsAnEdit() )
|
||||
DEFINE_METHOD( IsAPlayerEdit, IsAPlayerEdit() )
|
||||
DEFINE_METHOD( UsesSplitTiming, UsesSplitTiming() )
|
||||
|
||||
static int HasSignificantTimingChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasSignificantTimingChanges()); return 1; }
|
||||
|
||||
@@ -469,14 +476,6 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int UsesSplitTiming( T* p, lua_State *L )
|
||||
{
|
||||
Song *song = SONGMAN->GetSongFromSteps(p);
|
||||
lua_pushboolean(L, p->m_Timing != song->m_SongTiming);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
LunaSteps()
|
||||
{
|
||||
ADD_METHOD( GetAuthorCredit );
|
||||
|
||||
@@ -133,6 +133,11 @@ public:
|
||||
|
||||
CachedObject<Steps> m_CachedObject;
|
||||
|
||||
/**
|
||||
* @brief Determine if the Steps use Split Timing by comparing the Song it's in.
|
||||
* @return true if the Step and Song use different timings, false otherwise. */
|
||||
bool UsesSplitTiming() const;
|
||||
|
||||
private:
|
||||
inline const Steps *Real() const { return parent ? parent : this; }
|
||||
void DeAutogen( bool bCopyNoteData = true ); /* If this Steps is autogenerated, make it a real Steps. */
|
||||
|
||||
Reference in New Issue
Block a user