@@ -236,7 +236,7 @@ class Note extends FlxSprite
236236 }
237237 }
238238
239- public static function initializeGlobalRGBShader (noteData : Int , ? note : Note = null )
239+ public static function initializeGlobalRGBShader (noteData : Int = 0 , ? note : Note = null )
240240 {
241241 if (note == null )
242242 {
@@ -246,7 +246,7 @@ class Note extends FlxSprite
246246 globalRgbShaders [noteData ] = newRGB ;
247247
248248 var arr : Array <FlxColor > = ClientPrefs .noteColorStyle != ' Quant-Based' ? (! PlayState .isPixelStage ) ? ClientPrefs .arrowRGB [noteData ] : ClientPrefs .arrowRGBPixel [noteData ] : ClientPrefs .quantRGB [noteData ];
249- if (noteData > - 1 && noteData <= arr .length )
249+ if (arr != null && noteData > - 1 && noteData <= arr .length )
250250 {
251251 newRGB .r = arr [0 ];
252252 newRGB .g = arr [1 ];
@@ -469,9 +469,10 @@ class Note extends FlxSprite
469469 }
470470 }
471471
472- if (copyScaleX && ! isSustainNote ) // if i did this on sustain notes it would break, sorry!
472+ if (copyScaleX )
473473 {
474474 scale .x = strum .scale .x ;
475+ if (isSustainNote ) updateHitbox ();
475476 }
476477 if (copyScaleY && ! isSustainNote )
477478 {
@@ -526,14 +527,16 @@ class Note extends FlxSprite
526527 var noteColor : RGBPalette ;
527528 var superCoolColor = null ;
528529 var arr : Array <Int > = [255 , 255 , 255 ];
530+ var rainbowTime = 0.0 ;
529531 public function updateRGBColors ()
530532 {
531533 if (rgbShader == null && useRGBShader ) rgbShader = new RGBShaderReference (this , initializeGlobalRGBShader (noteData , this ));
532534 else switch (ClientPrefs .noteColorStyle )
533535 {
534536 case ' Rainbow' :
537+ rainbowTime = (ClientPrefs .rainbowTime != 0 ? ClientPrefs .rainbowTime * 1000 : Conductor .crochet );
535538 superCoolColor = new FlxColor (0xFFFF0000 );
536- superCoolColor .hue = (strumTime / ( ClientPrefs . rainbowTime * 1000 ) * 360 ) % 360 ;
539+ superCoolColor .hue = (strumTime / rainbowTime * 360 ) % 360 ;
537540 rgbShader .r = superCoolColor ;
538541 rgbShader .g = FlxColor .WHITE ;
539542 rgbShader .b = superCoolColor .getDarkened (0.7 );
@@ -604,7 +607,7 @@ class Note extends FlxSprite
604607 }
605608
606609 strumTime = chartNoteData .strumTime ;
607- noteData = chartNoteData .noteData % 4 ;
610+ noteData = chartNoteData .noteData ;
608611 noteType = chartNoteData .noteType ;
609612 animSuffix = chartNoteData .animSuffix ;
610613 noAnimation = noMissAnimation = chartNoteData .noAnimation ;
@@ -661,7 +664,7 @@ class Note extends FlxSprite
661664 if (isSustainNote ) {
662665 offsetX + = width / 2 ;
663666 copyAngle = false ;
664- animation .play (colArray [noteData % 4 ] + (chartNoteData .isSustainEnd ? ' holdend' : ' hold' ));
667+ animation .play (colArray [noteData ] + (chartNoteData .isSustainEnd ? ' holdend' : ' hold' ));
665668 updateHitbox ();
666669 offsetX - = width / 2 ;
667670
@@ -671,7 +674,7 @@ class Note extends FlxSprite
671674 updateHitbox ();
672675 }
673676 else {
674- animation .play (colArray [noteData % 4 ] + ' Scroll' );
677+ animation .play (colArray [noteData ] + ' Scroll' );
675678 if (! copyAngle ) copyAngle = true ;
676679 offsetX = 0 ; // Just in case we recycle a sustain note to a regular note
677680 if (useRGBShader && shouldCenterOffsets )
0 commit comments