Skip to content

Commit

Permalink
Added a option in metrics.ini to disable flash (or glow in other word…
Browse files Browse the repository at this point in the history
…s) when playing with hidden or sudden mod.
  • Loading branch information
xNihil0 committed Sep 30, 2018
1 parent da3b610 commit f1c7e64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Themes/_fallback/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ TinyPercentBase=0.5
TinyPercentGate=1
DizzyHoldHeads=false
QuantizeArrowYPosition=false
NoGlow=false

[Background]
# Background stuff. again, its usually a better idea to leave this alone
Expand Down
12 changes: 10 additions & 2 deletions src/ArrowEffects.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "global.h"
#include "global.h"
#include "ArrowEffects.h"
#include "GameConstantsAndTypes.h"
#include "GameState.h"
Expand Down Expand Up @@ -104,6 +104,7 @@ static ThemeMetric<float> BEAT_PI_HEIGHT("ArrowEffects", "BeatPIHeight");
static ThemeMetric<float> TINY_PERCENT_BASE("ArrowEffects", "TinyPercentBase");
static ThemeMetric<float> TINY_PERCENT_GATE("ArrowEffects", "TinyPercentGate");
static ThemeMetric<bool> DIZZY_HOLD_HEADS("ArrowEffects", "DizzyHoldHeads");
static ThemeMetric<bool> NO_GLOW("ArrowEffects", "NoGlow");

static const PlayerOptions* curr_options = nullptr;

Expand Down Expand Up @@ -909,7 +910,14 @@ ArrowEffects::GetGlow(int iCol,
fPercentVisible = 1 - fPercentFadeToFail;

const float fDistFromHalf = fabsf(fPercentVisible - 0.5f);
return SCALE(fDistFromHalf, 0, 0.5f, 1.3f, 0);

if (!NO_GLOW) {
return SCALE(fDistFromHalf, 0, 0.5f, 1.3f, 0);
}
else {
return 0;
}

}

float
Expand Down

0 comments on commit f1c7e64

Please sign in to comment.