Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

CLEAR: FULLCOMBO is shown regardless of gauge #39

Open
staticssleever668 opened this issue Apr 3, 2023 · 0 comments
Open

CLEAR: FULLCOMBO is shown regardless of gauge #39

staticssleever668 opened this issue Apr 3, 2023 · 0 comments

Comments

@staticssleever668
Copy link
Contributor

staticssleever668 commented Apr 3, 2023

Version: e6663f6 (0.10.3.3).
LV 2023-04-03 13-41-25
Looks like a regressions since ebdab89.

std::pair<bool, Option::e_lamp_type> getSaveScoreType()
{
if (gInCustomize) return { false, Option::LAMP_NOPLAY };
if (gSelectContext.pitchSpeed < 1.0)
return { false, Option::LAMP_NOPLAY };
int battleType = State::get(IndexOption::PLAY_BATTLE_TYPE);
if (battleType == Option::BATTLE_LOCAL || battleType == Option::BATTLE_DB)
return { false, Option::LAMP_NOPLAY };
if (State::get(IndexOption::PLAY_HSFIX_TYPE) == Option::e_speed_type::SPEED_FIX_CONSTANT)
return { false, Option::LAMP_NOPLAY };
Option::e_random_type randomType = (Option::e_random_type)State::get(IndexOption::PLAY_RANDOM_TYPE_1P);
bool isPlaymodeDP = (State::get(IndexOption::PLAY_MODE) == Option::PLAY_MODE_DOUBLE ||
State::get(IndexOption::PLAY_MODE) == Option::PLAY_MODE_DP_GHOST_BATTLE);
if (randomType == Option::e_random_type::RAN_HRAN)
return { false, Option::LAMP_ASSIST };
else if (randomType == Option::e_random_type::RAN_ALLSCR)
return { false, Option::LAMP_NOPLAY };
if (isPlaymodeDP)
{
Option::e_random_type randomType2P = (Option::e_random_type)State::get(IndexOption::PLAY_RANDOM_TYPE_2P);
if (randomType2P == Option::e_random_type::RAN_HRAN)
return { false, Option::LAMP_ASSIST };
else if (randomType2P == Option::e_random_type::RAN_ALLSCR)
return { false, Option::LAMP_NOPLAY };
}
if (State::get(IndexSwitch::PLAY_OPTION_AUTOSCR_1P))
return { true, Option::LAMP_ASSIST };
if (isPlaymodeDP)
{
if (State::get(IndexSwitch::PLAY_OPTION_AUTOSCR_2P))
return { true, Option::LAMP_ASSIST };
}
Option::e_gauge_type gaugeType = (Option::e_gauge_type)State::get(IndexOption::PLAY_GAUGE_TYPE_1P);
Option::e_lamp_type lampType = Option::e_lamp_type::LAMP_FULLCOMBO; // FIXME change to PERFECT / MAX
return { true, lampType };
}

This function returns the maximum allowed clear type for a given gauge, which is then set into IndexOption::CHART_SAVE_LAMP_TYPE, which is then used by the renderer to determine which clear type to show.
I think there should be another IndexOption along the lines of GAUGE_CLEAR_TYPE, which would be set to std::min(getSaveScoreType(), theLastSnippetOfOldGetSaveScoreType()), which in turn would be used for setting the DST options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant