Convert ms to seconds. Use the PlayerState's m_Position in ArrowEffects so it actually works.
This commit is contained in:
@@ -488,7 +488,7 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float
|
|||||||
|
|
||||||
if( curr_options->m_fTimeSpacing != 0.0f )
|
if( curr_options->m_fTimeSpacing != 0.0f )
|
||||||
{
|
{
|
||||||
float fSongSeconds = GAMESTATE->m_Position.m_fMusicSecondsVisible;
|
float fSongSeconds = pPlayerState->m_Position.m_fMusicSecondsVisible;
|
||||||
float fNoteSeconds = pCurSteps->GetTimingData()->GetElapsedTimeFromBeat(fNoteBeat);
|
float fNoteSeconds = pCurSteps->GetTimingData()->GetElapsedTimeFromBeat(fNoteBeat);
|
||||||
float fSecondsUntilStep = fNoteSeconds - fSongSeconds;
|
float fSecondsUntilStep = fNoteSeconds - fSongSeconds;
|
||||||
float fBPM = curr_options->m_fScrollBPM;
|
float fBPM = curr_options->m_fScrollBPM;
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
|||||||
{
|
{
|
||||||
// Format the string to be something like "10ms VisualDelay".
|
// Format the string to be something like "10ms VisualDelay".
|
||||||
// Note that we don't process sub-millisecond visual delay.
|
// Note that we don't process sub-millisecond visual delay.
|
||||||
AddTo.push_back( ssprintf("%.0fms VisualDelay", m_fVisualDelay) );
|
AddTo.push_back( ssprintf("%.0fms VisualDelay", m_fVisualDelay * 1000.0f) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,17 +608,17 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
|||||||
{
|
{
|
||||||
level = 0;
|
level = 0;
|
||||||
}
|
}
|
||||||
else if ( EndsWith(s, "ms") )
|
|
||||||
{
|
|
||||||
// Strip off the "ms" before parsing.
|
|
||||||
RString ms_value = s.substr(0, s.size()-2 );
|
|
||||||
level = StringToFloat( ms_value );
|
|
||||||
}
|
|
||||||
else if( isdigit(s[0]) || s[0] == '-' )
|
else if( isdigit(s[0]) || s[0] == '-' )
|
||||||
{
|
{
|
||||||
|
if ( EndsWith(s, "ms") )
|
||||||
|
{
|
||||||
|
// Strip off the "ms" before parsing and convert to seconds.
|
||||||
|
RString ms_value = s.substr(0, s.size()-2 );
|
||||||
|
level = StringToFloat( ms_value ) / 1000.0f;
|
||||||
|
}
|
||||||
/* If the last character is a *, they probably said "123*" when
|
/* If the last character is a *, they probably said "123*" when
|
||||||
* they meant "*123". */
|
* they meant "*123". */
|
||||||
if( s.Right(1) == "*" )
|
else if( s.Right(1) == "*" )
|
||||||
{
|
{
|
||||||
// XXX: We know what they want, is there any reason not to handle it?
|
// XXX: We know what they want, is there any reason not to handle it?
|
||||||
// Yes. We should be strict in handling the format. -Chris
|
// Yes. We should be strict in handling the format. -Chris
|
||||||
|
|||||||
Reference in New Issue
Block a user