From eab010b8c4c28196cf260468b9f9b22787366e76 Mon Sep 17 00:00:00 2001 From: holychowders Date: Fri, 29 Apr 2022 16:00:14 -0500 Subject: [PATCH] Change `can_see_entity()` parameter ordering to be consistent with other action nodes. - Moved `agent` and `controller` to front. --- server/src/sys/agent.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index d02ef27e47..05e7f1b98d 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1588,7 +1588,7 @@ impl<'a> AgentData<'a> { let chance = thread_rng().gen_bool(0.3); (within_listen_dist(e_pos) && chance) - || self.can_see_entity(entity, e_pos, agent, controller, read_data) + || self.can_see_entity(agent, controller, entity, e_pos, read_data) }; // Search the area. @@ -2428,10 +2428,10 @@ impl<'a> AgentData<'a> { fn can_see_entity( &self, - other: EcsEntity, - other_pos: &Pos, agent: &Agent, controller: &Controller, + other: EcsEntity, + other_pos: &Pos, read_data: &ReadData, ) -> bool { let other_stealth_coefficient = {