From 23ea5d41d9cb523cbe97d3b402288ad251912696 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Sun, 15 Jan 2023 16:19:53 +0800 Subject: [PATCH] Use alert radius as render distance --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a8c43e4..d1d291e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -190,7 +190,8 @@ async fn handle(mut client: Client, event: Event, mut state: State) -> anyhow::R log_error( client .set_client_information(ClientInformation { - view_distance: 2, + view_distance: (state.bot_configuration.alert_radius as f32 / 16.0).ceil() + as u8, ..Default::default() }) .await,