From d3c14ce0383304e32068d4bdb96e36020d2724d5 Mon Sep 17 00:00:00 2001 From: Sunk <69110309+Sunketchupm@users.noreply.github.com> Date: Mon, 6 Nov 2023 01:40:05 -0500 Subject: [PATCH] Fix camera bug introduced by a previous PR (#505) * Fix camera bug introduced by a previous PR * Readjust camera collision code --- src/engine/surface_load.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index ed7a4dc9..eec3254d 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -392,7 +392,7 @@ static void load_static_surfaces(s16 **data, s16 *vertexData, s16 surfaceType, s struct Surface *surface; s8 room = 0; bool hasForce = surface_has_force(surfaceType); - bool flags = surf_has_no_cam_collision(surfaceType); + s8 flags = surf_has_no_cam_collision(surfaceType) ? SURFACE_FLAG_NO_CAM_COLLISION : 0; numSurfaces = *(*data); *data += 1; @@ -407,7 +407,7 @@ static void load_static_surfaces(s16 **data, s16 *vertexData, s16 surfaceType, s if (surface != NULL) { surface->room = room; surface->type = surfaceType; - surface->flags = (s8) flags; + surface->flags = flags; if (hasForce) { surface->force = *(*data + 3); @@ -671,7 +671,7 @@ void load_object_surfaces(s16** data, s16* vertexData) { hasForce = surface_has_force(surfaceType); - flags = surf_has_no_cam_collision(surfaceType); + flags = surf_has_no_cam_collision(surfaceType) ? SURFACE_FLAG_NO_CAM_COLLISION : 0; flags |= SURFACE_FLAG_DYNAMIC; // The DDD warp is initially loaded at the origin and moved to the proper