Skip to content

Commit f07b3e9

Browse files
committed
closes #1131 and #1112
1 parent dc03e89 commit f07b3e9

File tree

4 files changed

+39
-28
lines changed

4 files changed

+39
-28
lines changed

source/HealthIcon.hx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class HealthIcon extends FlxSprite
6161
var iconAsset:FlxGraphic = FlxG.bitmap.add(Paths.image(name));
6262

6363
if (iconAsset == null)
64-
iconAsset == Paths.image('icons/icon-face');
64+
iconAsset = Paths.image('icons/icon-face');
6565
else if (!Paths.fileExists('images/icons/icon-face.png', IMAGE)){
6666
// throw "Don't delete the placeholder icon";
6767
trace("Warning: could not find the placeholder icon, expect crashes!");
@@ -90,13 +90,23 @@ class HealthIcon extends FlxSprite
9090
playAnim('normal');
9191
} else {
9292
if (iconMeta?.hasWinIcon || iSize == 3) {
93-
loadGraphic(file, true, Math.floor(width / 3), Math.floor(height)); //Then load it fr // winning icons go br
93+
loadGraphic(iconAsset, true, Math.floor(width / 3), Math.floor(height)); //Then load it fr // winning icons go br
94+
initialWidth = width;
95+
initialHeight = height;
9496
iconOffsets[0] = (width - 150) / 3;
9597
iconOffsets[1] = (height - 150) / 3;
98+
updateHitbox();
99+
100+
animation.add(char, [0, 1, 2], 0, false, isPlayer);
96101
} else {
97-
loadGraphic(file, true, Math.floor(width / 2), Math.floor(height)); //Then load it fr // winning icons go br
102+
loadGraphic(iconAsset, true, Math.floor(width / 2), Math.floor(height)); //Then load it fr // winning icons go br
103+
initialWidth = width;
104+
initialHeight = height;
98105
iconOffsets[0] = (width - 150) / 2;
99106
iconOffsets[1] = (height - 150) / 2;
107+
updateHitbox();
108+
109+
animation.add(char, [0, 1], 0, false, isPlayer);
100110
}
101111
}
102112

source/PlayState.hx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ class PlayState extends MusicBeatState
181181
public var maxCombo:Float = 0;
182182
public var missCombo:Int = 0;
183183

184-
var notesAddedCount:Int = 0;
185-
var notesToRemoveCount:Int = 0;
186-
var oppNotesToRemoveCount:Int = 0;
184+
var notesAddedCount:Int = 0;
185+
var notesToRemoveCount:Int = 0;
186+
var oppNotesToRemoveCount:Int = 0;
187187
public var iconBopsThisFrame:Int = 0;
188188
public var iconBopsTotal:Int = 0;
189189

@@ -416,22 +416,22 @@ class PlayState extends MusicBeatState
416416

417417
var theListBotplay:Array<String> = [];
418418

419-
var formattedScore:String;
420-
var formattedSongMisses:String;
421-
var formattedCombo:String;
422-
var formattedMaxCombo:String;
423-
var formattedNPS:String;
424-
var formattedMaxNPS:String;
425-
var formattedOppNPS:String;
426-
var formattedMaxOppNPS:String;
427-
var formattedEnemyHits:String;
428-
var npsString:String;
429-
var accuracy:String;
430-
var fcString:String;
431-
var hitsound:FlxSound;
432-
433-
var botText:String;
434-
var tempScore:String;
419+
var formattedScore:String;
420+
var formattedSongMisses:String;
421+
var formattedCombo:String;
422+
var formattedMaxCombo:String;
423+
var formattedNPS:String;
424+
var formattedMaxNPS:String;
425+
var formattedOppNPS:String;
426+
var formattedMaxOppNPS:String;
427+
var formattedEnemyHits:String;
428+
var npsString:String;
429+
var accuracy:String;
430+
var fcString:String;
431+
var hitsound:FlxSound;
432+
433+
var botText:String;
434+
var tempScore:String;
435435

436436
var startingTime:Float = haxe.Timer.stamp();
437437
var endingTime:Float = haxe.Timer.stamp();

source/options/BaseOptionsMenu.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package options;
22

3-
import flash.text.TextField;
43
import flixel.FlxG;
54
import flixel.FlxSprite;
65
import flixel.addons.display.FlxGridOverlay;
@@ -14,7 +13,6 @@ import flash.text.TextField;
1413
import flixel.FlxG;
1514
import flixel.FlxSprite;
1615
import flixel.util.FlxSave;
17-
import haxe.Json;
1816
import flixel.tweens.FlxEase;
1917
import flixel.tweens.FlxTween;
2018
import flixel.util.FlxTimer;

source/options/OptionsState.hx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package options;
22

3-
import flash.text.TextField;
43
import flixel.FlxG;
54
import flixel.FlxSprite;
65
import flixel.FlxCamera;
@@ -16,7 +15,6 @@ import flixel.FlxG;
1615
import flixel.FlxObject;
1716
import flixel.FlxSprite;
1817
import flixel.util.FlxSave;
19-
import haxe.Json;
2018
import flixel.tweens.FlxEase;
2119
import flixel.tweens.FlxTween;
2220
import flixel.util.FlxTimer;
@@ -47,8 +45,10 @@ class OptionsState extends MusicBeatState
4745
function openSelectedSubstate(label:String) {
4846
switch(label) {
4947
case 'Note Colors':
50-
if (!ClientPrefs.enableColorShader) CoolUtil.coolError("It appears that you don't have the 'Enable Note Colors' option enabled!\nTo prevent a crash, you cannot access this menu unless you turn the option on.\nYou can find it in the Visuals & UI menu.", "JS Engine Anti-Crash Tool");
51-
else openSubState(new options.NotesSubState());
48+
if (!ClientPrefs.enableColorShader)
49+
CoolUtil.coolError("It appears that you don't have the 'Enable Note Colors' option enabled!\nTo prevent a crash, you cannot access this menu unless you turn the option on.\nYou can find it in the Visuals & UI menu.", "JS Engine Anti-Crash Tool");
50+
else
51+
openSubState(new options.NotesSubState());
5252
case 'Controls':
5353
openSubState(new options.ControlsSubState());
5454
case 'Graphics':
@@ -81,6 +81,9 @@ class OptionsState extends MusicBeatState
8181
otherCamera = new FlxCamera();
8282
subCamera.bgColor.alpha = 0;
8383
otherCamera.bgColor.alpha = 0;
84+
// proper fix
85+
if (onPlayState && PlayState.SONG.disableNoteRGB)
86+
options.remove('Note Colors');
8487

8588
FlxG.cameras.add(subCamera, false);
8689
FlxG.cameras.add(otherCamera, false);

0 commit comments

Comments
 (0)