Skip to content

Commit

Permalink
FixZBufferPrecision: allow fix to apply during goal cutscene
Browse files Browse the repository at this point in the history
TODO: could probably enable during STATE_ENDING as well, need to check if there are cutoffs...
  • Loading branch information
emoose committed Dec 11, 2024
1 parent 2e9c05c commit 9a6f795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class FixZBufferPrecision : public Hook
// only set znear to 1 if...
if ((camera->camera_mode_34A == 2 || camera->camera_mode_34A == 0) // ... in third-person or FPV
&& camera->camera_mode_timer_364 == 0 // ... not switching cameras
&& *Game::current_mode == STATE_GAME) // ... we're in main game state (not in STATE_START cutscene etc)
&& (*Game::current_mode == STATE_GAME || *Game::current_mode == STATE_GOAL)) // ... we're in main game state (not in STATE_START cutscene etc)
{
camera->perspective_znear_BC = 1.0f;
}
Expand Down

0 comments on commit 9a6f795

Please sign in to comment.