Skip to content

Commit

Permalink
fix RainFall and StarFall having a chance to crash effects engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Dec 30, 2024
1 parent da94f96 commit 55a5a60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Project-Aurora/Project-Aurora/Profiles/Desktop/Event_Idle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class EventIdle : LightEvent

internal readonly LayerEffectConfig EffectCfg = new();

internal readonly DeviceKeys[] AllKeys = Enum.GetValues(typeof(DeviceKeys)).Cast<DeviceKeys>().ToArray();
internal readonly DeviceKeys[] AllKeys = Enum.GetValues<DeviceKeys>().Except([DeviceKeys.NONE]).ToArray();

private AwayEffect _awayEffect = DimEffect.Instance;

Expand Down Expand Up @@ -219,7 +219,8 @@ public override void Update(BitmapEffectLayer layer)
{
for (var x = 0; x < IdleAmount; x++)
{
var star = eventIdle.AllKeys[eventIdle.Randomizer.Next(eventIdle.AllKeys.Length)];
var index = eventIdle.Randomizer.Next(eventIdle.AllKeys.Length);
var star = eventIdle.AllKeys[index];
_raindrops[star] = 1.0f;
}

Expand Down

0 comments on commit 55a5a60

Please sign in to comment.