Skip to content

Commit

Permalink
stop changing hold timing windows thanks
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Aug 26, 2022
1 parent 86d8a34 commit c24c61a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
1 change: 0 additions & 1 deletion Themes/_fallback/base._ini
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@ HoldCheckpoints=false
ImmediateHoldLetGo=true
RequireStepOnHoldHeads=true
CheckpointsUseTimeSignatures=false
InitialHoldLife=1
RollBodyIncrementsCombo=true
CheckpointsTapsSeparateJudgment=true

Expand Down
1 change: 0 additions & 1 deletion Themes/_fallback/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ CheckpointsFlashOnHold=false
ImmediateHoldLetGo=true
ComboBreakOnImmediateHoldLetGo=false
RequireStepOnHoldHeads=true
InitialHoldLife=1
RollBodyIncrementsCombo=false
ScoreMissedHoldsAndRolls=false
PercentUntilColorCombo=0.25
Expand Down
38 changes: 27 additions & 11 deletions src/Etterna/Actor/Gameplay/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ static ThemeMetric<int> DRAW_DISTANCE_BEFORE_TARGET_PIXELS;
static ThemeMetric<bool> ROLL_BODY_INCREMENTS_COMBO;
static ThemeMetric<bool> COMBO_BREAK_ON_IMMEDIATE_HOLD_LET_GO;

/** @brief How much life is in a hold note when you start on it? */
ThemeMetric<float> INITIAL_HOLD_LIFE("Player", "InitialHoldLife");
ThemeMetric<bool> PENALIZE_TAP_SCORE_NONE("Player", "PenalizeTapScoreNone");
ThemeMetric<bool> CHECKPOINTS_FLASH_ON_HOLD(
"Player",
Expand Down Expand Up @@ -188,28 +186,46 @@ JudgedRows::Resize(size_t iMin)
auto
Player::GetWindowSeconds(TimingWindow tw) -> float
{
// mines should have a static hit window across all judges to be
// logically consistent with the idea that increasing judge should
// not make any elementof the game easier, so now they do
if (tw == TW_Mine) {
return 0.075F; // explicit return until i remove this stuff from
switch (tw) {
// mines should have a static hit window across all judges to be
// logically consistent with the idea that increasing judge should
// not make any elementof the game easier, so now they do
case TW_Mine:
return 0.075F;
case TW_Hold:
return 0.25F * m_fTimingWindowScale;
case TW_Roll:
return 0.5F * m_fTimingWindowScale;
default:
break;
}
// prefs.ini

float fSecs = m_fTimingWindowSeconds[tw];
fSecs *= m_fTimingWindowScale;
fSecs = std::clamp(fSecs, 0.F, 0.18F);
return fSecs;
}

auto
Player::GetWindowSecondsCustomScale(TimingWindow tw, float timingScale) -> float
{
if (tw == TW_Mine) {
return 0.075F;
switch (tw) {
// mines should have a static hit window across all judges to be
// logically consistent with the idea that increasing judge should
// not make any elementof the game easier, so now they do
case TW_Mine:
return 0.075F;
case TW_Hold:
return 0.25F * m_fTimingWindowScale;
case TW_Roll:
return 0.5F * m_fTimingWindowScale;
default:
break;
}

float fSecs = m_fTimingWindowSeconds[tw];
fSecs *= timingScale;
fSecs = std::clamp(fSecs, 0.F, 0.18F);
return fSecs;
}

Expand Down Expand Up @@ -2366,7 +2382,7 @@ Player::CrossedRows(int iLastRowCrossed,
const auto iTrack = iter.Track();
switch (tn.type) {
case TapNoteType_HoldHead: {
tn.HoldResult.fLife = INITIAL_HOLD_LIFE;
tn.HoldResult.fLife = initialHoldLife;
if (!REQUIRE_STEP_ON_HOLD_HEADS) {
const auto pn = m_pPlayerState->m_PlayerNumber;
std::vector<GameInput> GameI;
Expand Down
2 changes: 2 additions & 0 deletions src/Etterna/Actor/Gameplay/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ AutoScreenMessage(SM_1000Combo);
AutoScreenMessage(SM_ComboStopped);
AutoScreenMessage(SM_ComboContinuing);

constexpr float initialHoldLife = 1.F;

/** @brief Accepts input, knocks down TapNotes that were stepped on, and keeps
* score for the player. */
class Player : public ActorFrame
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Gameplay/PlayerReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ PlayerReplay::CrossedRows(int iLastRowCrossed,
const auto iTrack = iter.Track();
switch (tn.type) {
case TapNoteType_HoldHead: {
tn.HoldResult.fLife = 1;
tn.HoldResult.fLife = initialHoldLife;
break;
}
default:
Expand Down

0 comments on commit c24c61a

Please sign in to comment.