Skip to content

Commit

Permalink
Fix stare bot instruction not always giving bots the right pitch due …
Browse files Browse the repository at this point in the history
…to recent changes (Thanks Goodly), try to fix rare issue where NWSE cursor is invalid
  • Loading branch information
UnknownShadow200 committed Oct 26, 2023
1 parent 9d40e99 commit a8c096c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GUI/Program.cs
Expand Up @@ -106,8 +106,8 @@ public static class Program
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);
}
Expand Down
4 changes: 2 additions & 2 deletions MCGalaxy/Bots/Instructions/HunterInstructions.cs
Expand Up @@ -159,9 +159,9 @@ public sealed class StareInstruction : BotInstruction {

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);
}
Expand Down

0 comments on commit a8c096c

Please sign in to comment.