From a8c096c14ab2e74f1994aad3f382960abc238ee6 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 26 Oct 2023 18:38:00 +1100 Subject: [PATCH] Fix stare bot instruction not always giving bots the right pitch due to recent changes (Thanks Goodly), try to fix rare issue where NWSE cursor is invalid --- GUI/Program.cs | 2 +- MCGalaxy/Bots/Instructions/HunterInstructions.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GUI/Program.cs b/GUI/Program.cs index e3b50775e..16c09fe4a 100644 --- a/GUI/Program.cs +++ b/GUI/Program.cs @@ -106,8 +106,8 @@ namespace MCGalaxy.Gui Cursor c = Cursors.SizeNWSE; } catch (ArgumentException ex) { Logger.LogError("checking Cursors", ex); - Popup.Warning("Video driver appears to be returning buggy cursor sizes\n\nAttempting to workaround this issue (might not work)"); try { BypassCursorsHACK(); } catch { } + Popup.Warning("Video driver appears to be returning buggy cursor sizes\n\nAttempted to workaround this issue (might not work)"); } catch (Exception ex) { Logger.LogError("checking Cursors", ex); } diff --git a/MCGalaxy/Bots/Instructions/HunterInstructions.cs b/MCGalaxy/Bots/Instructions/HunterInstructions.cs index cce245966..868daf0ab 100644 --- a/MCGalaxy/Bots/Instructions/HunterInstructions.cs +++ b/MCGalaxy/Bots/Instructions/HunterInstructions.cs @@ -159,9 +159,9 @@ namespace MCGalaxy.Bots static void FaceTowards(PlayerBot bot, Player p) { Position srcPos = bot.Pos; - srcPos.Y += ModelInfo.CalcEyeHeight(p); + srcPos.Y += ModelInfo.CalcEyeHeight(bot); Position dstPos = p.Pos; - dstPos.Y += ModelInfo.CalcEyeHeight(bot); + dstPos.Y += ModelInfo.CalcEyeHeight(p); bot.FaceTowards(srcPos, dstPos); }