From 004be6395f89bc59153253c29e12d4da74094fde Mon Sep 17 00:00:00 2001 From: Maxicarlos08 Date: Mon, 1 Jan 2024 13:21:40 +0100 Subject: [PATCH] Don't dismount if we're a steering entity --- server/agent/src/action_nodes.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/agent/src/action_nodes.rs b/server/agent/src/action_nodes.rs index bf83a93e44..8e8f8017a0 100644 --- a/server/agent/src/action_nodes.rs +++ b/server/agent/src/action_nodes.rs @@ -594,7 +594,10 @@ impl<'a> AgentData<'a> { tgt_pos: &Pos, ) { if read_data.is_riders.contains(*self.entity) - || read_data.is_volume_riders.contains(*self.entity) + || read_data + .is_volume_riders + .get(*self.entity) + .map_or(false, |r| !r.is_steering_entity()) { controller.push_event(ControlEvent::Unmount); } @@ -652,7 +655,10 @@ impl<'a> AgentData<'a> { const MAX_FLEE_SPEED: f32 = 0.65; if read_data.is_riders.contains(*self.entity) - || read_data.is_volume_riders.contains(*self.entity) + || read_data + .is_volume_riders + .get(*self.entity) + .map_or(false, |r| !r.is_steering_entity()) { controller.push_event(ControlEvent::Unmount); }