summaryrefslogtreecommitdiffhomepage
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
parent02e32261880cfd90c300907c01e2e87e59dc7343 (diff)
editor: random krap
-rw-r--r--editor/inspect-types.cpp2
-rw-r--r--editor/update.cpp4
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();