Skip to content

Commit

Permalink
somehow this breaks more than it fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 1, 2020
1 parent bb42b45 commit b5ee15f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2854,7 +2854,6 @@ struct OHJumpMods
int max_ohjump_seq = 0;
int window_roll_taps = 0;
int cc_taps = 0;
int ohjump_taps = 0;
// we cast the one in itv_info from int
float hand_taps = 0.f;
float floatymcfloatface = 0.f;
Expand Down Expand Up @@ -2935,9 +2934,6 @@ struct OHJumpMods
if (now.col == col_empty)
return;

if (now.col == col_ohjump)
ohjump_taps += 2;

// we know between the following that the latter is more
// difficult [12][12][12]222[12][12][12]
// [12][12][12]212[12][12][12]
Expand Down Expand Up @@ -3004,7 +3000,7 @@ struct OHJumpMods
}
}

inline bool handle_case_optimizations(vector<float> doot[], const int& i)
inline bool handle_case_optimizations(const ItvHandInfo& itvh, vector<float> doot[], const int& i)
{
if (floatymcfloatface >= hand_taps) {
min_set(doot, i);
Expand All @@ -3027,24 +3023,25 @@ struct OHJumpMods
}

// no ohjumps
if (ohjump_taps == 0) {
if (itvh.oh_jump_taps) {
neutral_set(doot, i);
set_debug_output(doot, i);
return true;
}

// no repeated oh jumps, prop scale only
if (max_ohjump_seq == 0) {
ohj_prop_component = ohj_prop_pool - (ohjump_taps / hand_taps);
ohj_prop_component =
ohj_prop_pool - (itvh.oh_jump_taps / hand_taps);
ohj_prop_component =
CalcClamp(ohj_prop_component, ohj_min_mod, ohj_max_mod);

pmod = fastsqrt(ohj_prop_component);
pmod = CalcClamp(ohj_base + pmod, ohj_min_mod, ohj_max_mod);
doot[OHJumpMod][i] = pmod;

cj_ohj_prop_component =
fastsqrt(cj_ohj_prop_pool - (ohjump_taps / hand_taps / 2.f));
cj_ohj_prop_component = fastsqrt(
cj_ohj_prop_pool - (itvh.oh_jump_taps / hand_taps / 2.f));
cj_ohj_prop_component =
CalcClamp(cj_ohj_prop_component, cj_ohj_min_mod, cj_ohj_max_mod);

Expand Down Expand Up @@ -3103,7 +3100,6 @@ struct OHJumpMods
{
// reset any interval stuff here
cc_taps = 0;
ohjump_taps = 0;
max_ohjump_seq = 0;
ohj_max_seq_component = neutral;
ohj_prop_component = neutral;
Expand Down Expand Up @@ -3140,7 +3136,7 @@ struct OHJumpMods
// handle simple cases first, execute this block if nothing easy is
// detected, fill out non-component debug info and handle interval
// resets at end
if (handle_case_optimizations(doot, i)) {
if (handle_case_optimizations(itvh, doot, i)) {
interval_reset();
return;
}
Expand Down

0 comments on commit b5ee15f

Please sign in to comment.