From 6b6cdccee742843d8151dc99f1846dc2ecb563f9 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 5 Apr 2024 01:42:50 +0200 Subject: [PATCH] change WantsNo* to WantsMax*, cuz Icarus likes to rotate a bit --- src/actor.rs | 28 ++++++++++++++-------------- src/commands.rs | 47 ++++++++++++++++++++++++++++++++--------------- src/defs.txt | 14 +++++++------- 3 files changed, 53 insertions(+), 36 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 3e1cc32..a13eb6b 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -12,8 +12,8 @@ impl Plugin for ActorPlugin { fn build(&self, app: &mut App) { app.add_systems(FixedUpdate, ( update_physics_lifeforms, - handle_wants_norotation, - handle_wants_novelocity, + handle_wants_maxrotation, + handle_wants_maxvelocity, )); app.add_systems(Update, ( handle_input, @@ -62,8 +62,8 @@ impl Default for Actor { #[derive(Component)] pub struct InConversationWithPlayer; #[derive(Component)] pub struct ActorEnteringVehicle; #[derive(Component)] pub struct ActorVehicleBeingEntered; -#[derive(Component)] pub struct WantsNoRotation; -#[derive(Component)] pub struct WantsNoVelocity; +#[derive(Component)] pub struct WantsMaxRotation(pub f64); +#[derive(Component)] pub struct WantsMaxVelocity(pub f64); #[derive(Component)] pub struct LifeForm { @@ -300,16 +300,16 @@ fn handle_collisions( } } -fn handle_wants_norotation( +fn handle_wants_maxrotation( //time: Res