From 943bea72f19610b96be71a474695a55f87a54ecc Mon Sep 17 00:00:00 2001 From: doyle Date: Sun, 22 Oct 2023 20:02:35 +1100 Subject: [PATCH] fp: Fix regression with camera not clamping to map bounds --- feely_pona.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feely_pona.cpp b/feely_pona.cpp index c2277e4..624805a 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -2192,7 +2192,8 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input if (game->play.camera_tracking_entity.size) camera->world_pos_target /= DQN_CAST(Dqn_f32)game->play.camera_tracking_entity.size; - if (!FP_Game_IsNilEntityHandle(game, game->play.clicked_entity)) { + // NOTE: Clamp camera to map bounds ============================================================ + { Dqn_V2 window_size = Dqn_V2_InitV2I(platform->core.window_size); camera->scale = window_size / camera->size;