From 722b07a415f82a7fe56f595497ddf2ec0816f27c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 27 Feb 2024 21:30:00 +0100 Subject: actually speed should be the property of critter --- editor/inspect-types.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'editor') diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 41a236b0..fe33a760 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -52,10 +52,6 @@ struct entity_accessors { [](const object& x) { return x.pass; }, [](object& x, pass_mode value) { x.set_bbox(x.offset, x.bbox_offset, x.bbox_size, value); }, }, - E::type::field{"speed"_s, - [](const object& x) { return x.speed; }, - [](object& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } - }, E::type::field{"bbox-offset"_s, [](const object& x) { return x.bbox_offset; }, [](object& x, Vector2b value) { x.set_bbox(x.offset, value, x.bbox_size, x.pass); }, @@ -211,6 +207,10 @@ struct entity_accessors { E::type::field{"name"_s, [](const critter& x) { return x.name; }, [](critter& x, const String& value) { x.name = value; } }, + E::type::field{"speed"_s, + [](const critter& x) { return x.speed; }, + [](critter& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } + }, }; auto t1 = std::tuple{ E::type::field{"playable"_s, @@ -218,7 +218,7 @@ struct entity_accessors { [](critter& x, bool value) { x.playable = value; }, constantly(constraints::max_length{ 128 }) }, }; - return std::tuple_cat(t0, prev, t1); + return std::tuple_cat(t0, t1, prev); } }; -- cgit v1.2.3