From 5d52d3cdf481acc9f9867b8a426a953c8e44abdf Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 5 Apr 2024 01:19:46 +0200 Subject: [PATCH] add "wants novelocity" command to icarus --- src/actor.rs | 39 ++++++++++++++++++++++++++++++++++----- src/commands.rs | 10 ++++++++++ src/defs.txt | 3 ++- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 065b00d..3e1cc32 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -13,6 +13,7 @@ impl Plugin for ActorPlugin { app.add_systems(FixedUpdate, ( update_physics_lifeforms, handle_wants_norotation, + handle_wants_novelocity, )); app.add_systems(Update, ( handle_input, @@ -62,6 +63,7 @@ impl Default for Actor { #[derive(Component)] pub struct ActorEnteringVehicle; #[derive(Component)] pub struct ActorVehicleBeingEntered; #[derive(Component)] pub struct WantsNoRotation; +#[derive(Component)] pub struct WantsNoVelocity; #[derive(Component)] pub struct LifeForm { @@ -299,13 +301,14 @@ fn handle_collisions( } fn handle_wants_norotation( - time: Res