From cd13b529c3752f9e4d80ef903a889cb78611407d Mon Sep 17 00:00:00 2001 From: yuni Date: Tue, 11 Jun 2024 00:50:25 +0200 Subject: [PATCH] base `handle_wants_maxvelocity` on current orbital velocity --- src/actor.rs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 483baeb..755fd0d 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -31,7 +31,7 @@ impl Plugin for ActorPlugin { update_physics_lifeforms, update_power, handle_wants_maxrotation, - handle_wants_maxvelocity, + handle_wants_maxvelocity.run_if(any_with_component::), handle_wants_lookat.run_if(alive), ), ); @@ -548,11 +548,29 @@ fn handle_wants_maxrotation( /// Slows down NPC's movement until they reach their target velocity. fn handle_wants_maxvelocity( time: Res