summaryrefslogtreecommitdiffhomepage
path: root/editor/update.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-19 03:09:28 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-19 03:09:28 +0100
commit423fb053e47d32b24c914d85306daf545a4cdd3b (patch)
treecdad40fddb4a9af2b62aa8eeb26be4b0a150e01a /editor/update.cpp
parent02e32261880cfd90c300907c01e2e87e59dc7343 (diff)
editor: random krap
Diffstat (limited to 'editor/update.cpp')
-rw-r--r--editor/update.cpp4
1 files changed, 2 insertions, 2 deletions
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();