Skip to content

Commit

Permalink
Fix screenshake not clearing the gameplay cache
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyTally authored and InfoTeddy committed Jan 29, 2023
1 parent 19b2a31 commit d9859d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions desktop_version/src/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3578,6 +3578,13 @@ void Graphics::screenshake(void)
set_render_target(gameTexture);
clear();

// Clear the gameplay texture so blackout() is actually black after a screenshake
if (game.gamestate == GAMEMODE)
{
set_render_target(gameplayTexture);
clear();
}

set_render_target(NULL);
copy_texture(tempTexture, NULL, NULL);
}
Expand Down

0 comments on commit d9859d4

Please sign in to comment.