diff options
-rw-r--r-- | editor/inspect-types.cpp | 2 | ||||
-rw-r--r-- | editor/update.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 2bca8a3c..22944a97 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -23,7 +23,7 @@ struct entity_accessors<scenery> { { using entity = Entity<scenery>; return std::tuple{ - entity::type<StringView>::field{"name"_s, + entity::type<StringView>::field{"atlas"_s, [](const scenery& x) { return loader.strip_prefix(x.atlas->name()); }, [](scenery&, StringView) {}, constantly(field_status::readonly), diff --git a/editor/update.cpp b/editor/update.cpp index 0d8f692e..2393c6ce 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -198,7 +198,7 @@ void app::update_character([[maybe_unused]] float dt) { auto& w = M->world(); auto c = w.find_entity<character>(_character_id); - if (c) + if (c && c->playable) c->set_keys(keys[key_left], keys[key_right], keys[key_up], keys[key_down]); } } @@ -219,10 +219,10 @@ void app::set_cursor() void app::update(float dt) { apply_commands(keys); + update_character(dt); update_world(dt); do_camera(dt, keys, get_key_modifiers()); clear_non_repeated_keys(); - update_character(dt); set_cursor(); M->world().maybe_collect(); |