From ccbfc22e8472776ac05a05dede34ef7af4b7c9d0 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 12 Aug 2024 18:02:02 -0500 Subject: [PATCH] fix camera debug rect not drawing --- src/user.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/user.c b/src/user.c index 002bee59..b7f284cd 100644 --- a/src/user.c +++ b/src/user.c @@ -756,10 +756,9 @@ INTERNAL void user_update(void) /* ---------------------------------------------------------------------- */ /* ========================== * - * Iterate entities + * Draw entities * ========================== */ - /* Iterate entities */ for (u64 entity_index = 0; entity_index < store->count; ++entity_index) { __profscope(user_entity_iter); @@ -769,7 +768,7 @@ INTERNAL void user_update(void) /* Skip undrawable entities */ if (sprite_tag_is_nil(ent->sprite) - && entity_has_prop(ent, ENTITY_PROP_CAMERA)) { + && !entity_has_prop(ent, ENTITY_PROP_CAMERA)) { continue; } @@ -953,7 +952,6 @@ INTERNAL void user_update(void) * ========================== */ { - /* Queue player move cmd */ struct v2 input_move_dir = { 0 }; { @@ -998,8 +996,7 @@ INTERNAL void user_update(void) }); /* Queue player fire cmd */ - queue_game_cmd(&cmd_list, (struct game_cmd) - { + queue_game_cmd(&cmd_list, (struct game_cmd) { .kind = GAME_CMD_KIND_PLAYER_FIRE, .state = (G.bind_states[USER_BIND_KIND_FIRE].num_presses > 0 || G.bind_states[USER_BIND_KIND_FIRE].is_held) ? GAME_CMD_STATE_START : GAME_CMD_STATE_STOP });