diff options
Diffstat (limited to 'editor/update.cpp')
| -rw-r--r-- | editor/update.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index 07d703e0..6107cfa6 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -202,12 +202,9 @@ void app::update_world(float dt) void app::update_character([[maybe_unused]] float dt) { auto& w = M->world(); - auto cptr = w.find_entity(_character_id); - if (cptr) - { - fm_debug_assert(cptr->type == entity_type::character); - static_cast<character&>(*cptr).set_keys(keys[key_left], keys[key_right], keys[key_up], keys[key_down]); - } + auto c = w.find_entity<character>(_character_id); + if (c) + c->set_keys(keys[key_left], keys[key_right], keys[key_up], keys[key_down]); } void app::set_cursor() |
