mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-09 07:09:41 -04:00
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:
parent
9d40e99695
commit
a8c096c14a
@ -106,8 +106,8 @@ namespace MCGalaxy.Gui
|
|||||||
Cursor c = Cursors.SizeNWSE;
|
Cursor c = Cursors.SizeNWSE;
|
||||||
} catch (ArgumentException ex) {
|
} catch (ArgumentException ex) {
|
||||||
Logger.LogError("checking Cursors", 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 { }
|
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) {
|
} catch (Exception ex) {
|
||||||
Logger.LogError("checking Cursors", ex);
|
Logger.LogError("checking Cursors", ex);
|
||||||
}
|
}
|
||||||
|
@ -159,9 +159,9 @@ namespace MCGalaxy.Bots
|
|||||||
|
|
||||||
static void FaceTowards(PlayerBot bot, Player p) {
|
static void FaceTowards(PlayerBot bot, Player p) {
|
||||||
Position srcPos = bot.Pos;
|
Position srcPos = bot.Pos;
|
||||||
srcPos.Y += ModelInfo.CalcEyeHeight(p);
|
srcPos.Y += ModelInfo.CalcEyeHeight(bot);
|
||||||
Position dstPos = p.Pos;
|
Position dstPos = p.Pos;
|
||||||
dstPos.Y += ModelInfo.CalcEyeHeight(bot);
|
dstPos.Y += ModelInfo.CalcEyeHeight(p);
|
||||||
|
|
||||||
bot.FaceTowards(srcPos, dstPos);
|
bot.FaceTowards(srcPos, dstPos);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user