From 9bd8b7f0177838e0b8ffa14d42613eae0a255565 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:19:10 -0400 Subject: [PATCH] Fix FOV jank --- src/game/rendering_graph_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 400cf31b..d581145d 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -1156,7 +1156,7 @@ static s32 obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) { // visibly pop in or out at the edge of the screen. // // Half of the fov in in-game angle units instead of degrees. - s16 halfFov = (get_first_person_enabled() ? gFirstPersonCamera.fov : not_zero(gCurGraphNodeCamFrustum->fov, gOverrideFOV) / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f; + s16 halfFov = ((get_first_person_enabled() ? gFirstPersonCamera.fov : not_zero(gCurGraphNodeCamFrustum->fov, gOverrideFOV)) / 2.0f + 1.0f) * 32768.0f / 180.0f + 0.5f; f32 divisor = coss(halfFov); if (divisor == 0) { divisor = 1; }