Skip to content

Commit

Permalink
fix: undo RenderingEntities inline initialization (#2374)
Browse files Browse the repository at this point in the history
fixes RenderingEntities inline initialization crashing the client when using custom map width/height
  • Loading branch information
Arufonsu authored Aug 7, 2024
1 parent b7b7f88 commit 447809f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Intersect.Client/Core/Graphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static FloatRect CurrentView
public static GameRenderer? Renderer;

//Cache the Y based rendering
public static HashSet<Entity>[,] RenderingEntities = new HashSet<Entity>[6, Options.MapHeight * 5];
public static HashSet<Entity>[,]? RenderingEntities;

private static GameContentManager sContentManager = null!;

Expand Down Expand Up @@ -135,6 +135,7 @@ public static GameFont FindFont(string font)

public static void InitInGame()
{
RenderingEntities = new HashSet<Entity>[6, Options.MapHeight * 5];
for (var z = 0; z < 6; z++)
{
for (var i = 0; i < Options.MapHeight * 5; i++)
Expand Down

0 comments on commit 447809f

Please sign in to comment.