diff --git a/source/ClientPrefs.hx b/source/ClientPrefs.hx index 28887b09..81986c0f 100644 --- a/source/ClientPrefs.hx +++ b/source/ClientPrefs.hx @@ -50,6 +50,8 @@ class ClientPrefs //public static var multiplicativeValue:Float = 0; public static var musicSelected:String = 'freakyMenu'; public static var autoPause:Bool = false; + public static var lightCpuStrum:Bool = true; + public static var lightPlayerStrum:Bool = true; public static var gameplaySettings:Map = [ 'scrollspeed' => 1.0, 'scrolltype' => 'multiplicative', @@ -126,6 +128,8 @@ class ClientPrefs public static function saveSettings() { + FlxG.save.data.lightCpuStrum = lightCpuStrum; + FlxG.save.data.lightPlayerStrum = lightPlayerStrum; FlxG.save.data.noteSkin = noteSkin; FlxG.save.data.winningIcon = winningIcon; //FlxG.save.data.multiplicativeValue = multiplicativeValue; @@ -190,9 +194,11 @@ class ClientPrefs public static function loadPrefs() { + if(FlxG.save.data.lightCpuStrum != null) lightCpuStrum = FlxG.save.data.lightCpuStrum; + if(FlxG.save.data.lightPlayerStrum != null) lightPlayerStrum = FlxG.save.data.lightPlayerStrum; if (FlxG.save.data.comboStacking != null) comboStacking = FlxG.save.data.comboStacking; - + if(FlxG.save.data.noteSkin != null) { noteSkin = FlxG.save.data.noteSkin; diff --git a/source/PlayState.hx b/source/PlayState.hx index 1cc2c0f1..523bfa09 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -4941,8 +4941,8 @@ class PlayState extends MusicBeatState //Dupe note remove notes.forEachAlive(function(note:Note) { if (daNote != note - && daNote.mustPress - && daNote.noteData == note.noteData + && daNote.mustPress + && daNote.noteData == note.noteData && daNote.isSustainNote == note.isSustainNote && Math.abs(daNote.strumTime - note.strumTime) < 1) { @@ -5089,6 +5089,7 @@ class PlayState extends MusicBeatState if(note.isSustainNote && !note.animation.curAnim.name.endsWith('end') && note.animation.curAnim != null) { time += 0.15; } + StrumPlayAnim(true, Std.int(Math.abs(note.noteData)), time); note.hitByOpponent = true; @@ -5242,7 +5243,7 @@ class PlayState extends MusicBeatState StrumPlayAnim(false, Std.int(Math.abs(note.noteData)), time); } else { var spr = playerStrums.members[note.noteData]; - if(spr != null) + if(spr != null && ClientPrefs.lightPlayerStrum) { spr.playAnim('confirm', true); } @@ -5733,13 +5734,24 @@ class PlayState extends MusicBeatState } function StrumPlayAnim(isDad:Bool, id:Int, time:Float) { + if(!ClientPrefs.lightCpuStrum && !ClientPrefs.lightPlayerStrum) return; + var spr:StrumNote = null; - if(isDad) - spr = strumLineNotes.members[id]; - else - spr = playerStrums.members[id]; + var light:Bool = true; + if(isDad) { + if(ClientPrefs.lightCpuStrum) + spr = strumLineNotes.members[id]; + else + return; + } + else { + if(ClientPrefs.lightPlayerStrum) + spr = playerStrums.members[id]; + else + return; + } - if(spr != null) { + if(spr != null && light) { spr.playAnim('confirm', true); spr.resetAnim = time; } diff --git a/source/options/GameplaySettingsSubState.hx b/source/options/GameplaySettingsSubState.hx index 1a0010a1..fbf4a7a2 100644 --- a/source/options/GameplaySettingsSubState.hx +++ b/source/options/GameplaySettingsSubState.hx @@ -100,6 +100,20 @@ class GameplaySettingsSubState extends BaseOptionsMenu false); addOption(option); + var option:Option = new Option('Light Player Strum', + "If unchecked, your strum will not light when pressing\na note.", + 'lightPlayerStrum', + 'bool', + true); + addOption(option); + + var option:Option = new Option('Light Opponent Strum', + "If unchecked, the opponent strum will not light when pressing\na note.", + 'lightCpuStrum', + 'bool', + true); + addOption(option); + var option:Option = new Option('Hide Opponent Notes', 'If checked, opponent notes get hidden.', 'opponentStrums',