From d42c7be141f52bb46c735719a7288b6b61c8f924 Mon Sep 17 00:00:00 2001 From: juliancoffee Date: Wed, 14 Jul 2021 19:14:30 +0300 Subject: [PATCH] Teach AI how to interact in this evil world --- common/src/comp/agent.rs | 2 +- server/src/sys/agent.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index b230e24e02..0cb2bb22cb 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -12,7 +12,7 @@ use vek::*; use super::dialogue::Subject; -pub const DEFAULT_INTERACTION_TIME: f32 = 3.0; +pub const DEFAULT_INTERACTION_TIME: f32 = 1.0; pub const TRADE_INTERACTION_TIME: f32 = 300.0; pub const MAX_LISTEN_DIST: f32 = 100.0; diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index 950b9f17de..3d89ee61ad 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1248,8 +1248,8 @@ impl<'a> AgentData<'a> { }, _ => { if can_speak(agent) { - // No new events, continue looking towards the last interacting player for some - // time + // No new events, continue looking towards the last + // interacting player for some time if let Some(Target { target, .. }) = &agent.target { self.look_toward(controller, read_data, target); } else {