Skip to content

Commit

Permalink
Ensure ground layer draws as part of update loop.
Browse files Browse the repository at this point in the history
Fixes bug where ground layer wouldn't be drawn on initial map load due to checking a variable set in update loop in the draw loop.
  • Loading branch information
ethanmoffat committed Sep 14, 2022
1 parent 3f54196 commit ebf5dcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EndlessClient/Rendering/Map/MapRenderer.cs
Expand Up @@ -113,6 +113,8 @@ public override void Update(GameTime gameTime)

if (Visible)
{
DrawGroundLayerToRenderTarget();

_characterRendererUpdater.UpdateCharacters(gameTime);
_npcRendererUpdater.UpdateNPCs(gameTime);
_dynamicMapObjectUpdater.UpdateMapObjects(gameTime);
Expand All @@ -136,7 +138,6 @@ public override void Draw(GameTime gameTime)
if (!Visible)
return;

DrawGroundLayerToRenderTarget();
DrawMapToRenderTarget();
DrawToSpriteBatch(_sb, gameTime);

Expand Down

0 comments on commit ebf5dcc

Please sign in to comment.