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

This commit is contained in:
UnknownShadow200 2023-10-26 18:38:00 +11:00
parent 9d40e99695
commit a8c096c14a
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);
}