Remove returned timing window table
This commit is contained in:
@@ -3915,10 +3915,9 @@ a,b = options:Boost(5)
|
||||
</Function>
|
||||
<Function name='Dizzy' return='float, float' arguments='float value, float approach_speed'> </Function>
|
||||
<Function name='DizzyHolds' return='bool' arguments='bool value'> </Function>
|
||||
<Function name='DisableTimingWindow' return='{TimingWindow}' arguments='TimingWindow tw'>
|
||||
<Function name='DisableTimingWindow' return='' arguments='TimingWindow tw'>
|
||||
Selectively disable specific timing windows for a player. <br />
|
||||
Valid values are <code>W1</code> to <code>W5</code> as defined in the <Link class='ENUM' function='TimingWindow' /> enum. <br />
|
||||
Returns a table of <code>TimingWindow</code> with the set of disabled windows after the function call.
|
||||
Valid values are <code>W1</code> to <code>W5</code> as defined in the <Link class='ENUM' function='TimingWindow' /> enum.
|
||||
</Function>
|
||||
<Function name='Distant' return='float, float' arguments='float value, float approach_speed'>
|
||||
If the player is using Distant (zero skew and positive tilt), returns the value of tilt and its approach_speed.<br />
|
||||
|
||||
+11
-15
@@ -144,21 +144,17 @@ TapNoteScore PlayerAI::GetTapNoteScore( const PlayerState* pPlayerState )
|
||||
TapNoteScore score = distribution.GetTapNoteScore();
|
||||
|
||||
const auto& disabledWindows = pPlayerState->m_PlayerOptions.GetCurrent().m_twDisabledWindows;
|
||||
for (int i = score; i >= TNS_W5; i--)
|
||||
{
|
||||
TapNoteScore cur_score = (TapNoteScore)i;
|
||||
// Downgrade the TapNoteScore if that specific window is disabled.
|
||||
if (cur_score == TNS_W1 && disabledWindows[TW_W1])
|
||||
score = TNS_W2;
|
||||
if (cur_score == TNS_W2 && disabledWindows[TW_W2])
|
||||
score = TNS_W3;
|
||||
if (cur_score == TNS_W3 && disabledWindows[TW_W3])
|
||||
score = TNS_W4;
|
||||
if (cur_score == TNS_W4 && disabledWindows[TW_W4])
|
||||
score = TNS_W5;
|
||||
if (cur_score == TNS_W5 && disabledWindows[TW_W5])
|
||||
score = TNS_None;
|
||||
}
|
||||
// Downgrade the TapNoteScore if that specific window is disabled.
|
||||
if (score == TNS_W1 && disabledWindows[TW_W1])
|
||||
score = TNS_W2;
|
||||
if (score == TNS_W2 && disabledWindows[TW_W2])
|
||||
score = TNS_W3;
|
||||
if (score == TNS_W3 && disabledWindows[TW_W3])
|
||||
score = TNS_W4;
|
||||
if (score == TNS_W4 && disabledWindows[TW_W4])
|
||||
score = TNS_W5;
|
||||
if (score == TNS_W5 && disabledWindows[TW_W5])
|
||||
score = TNS_None;
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
@@ -2046,16 +2046,6 @@ public:
|
||||
// Insert the specified TimingWindow into the disabled windows set.
|
||||
p->m_twDisabledWindows.set(Enum::Check<TimingWindow>(L, 1));
|
||||
}
|
||||
// Construct a new table indicating all of the disabled windows.
|
||||
lua_newtable( L );
|
||||
int j = 0;
|
||||
for (int i=TW_W1; i != TW_W5; ++i) {
|
||||
if (p->m_twDisabledWindows[i]) {
|
||||
Enum::Push(L, static_cast<TimingWindow>(i));
|
||||
lua_rawseti( L, -2, j+1 );
|
||||
++j;
|
||||
}
|
||||
}
|
||||
OPTIONAL_RETURN_SELF(original_top);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user