Skip to content

Commit

Permalink
Fix note spawing crashing the game
Browse files Browse the repository at this point in the history
  • Loading branch information
flustix committed Mar 24, 2024
1 parent 5255370 commit c556b31
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,14 @@ private DrawableHitObject createHitObject(HitObject hitObject)
drawable.Keybind = screen.Input.Keys[hitObject.Lane - 1];
drawable.OnHit += hit;

for (var i = 0; i < screen.Input.Pressed.Length; i++)
drawable.OnLoadComplete += _ =>
{
var bind = screen.Input.Keys[i];
drawable.OnPressed(bind);
}
for (var i = 0; i < screen.Input.Pressed.Length; i++)
{
var bind = screen.Input.Keys[i];
drawable.OnPressed(bind);
}
};

return drawable;
}
Expand Down

0 comments on commit c556b31

Please sign in to comment.