Files
Server/src/engine/devcmd/cmds
MagicBotandClaude Opus 5.5 bbf978872b Fix /rotate for NPCs, mobs and buildings past 180 degrees
/rotate took degrees but stored them on NPCs and mobs where the code expects
cos of half the yaw, so the client got NaN and the DB got degrees; /rotate
face passed radians the same way. Buildings used |cos| for w, which mirrored
any angle above 180 (270 became 90). Every kind now takes a yaw in radians
(degrees from the command, the facing angle for "face") through
Quaternion.fromYaw. NPC and mob yaws are wrapped to [0, 2 pi) so the stored
cos reloads to the same angle.

Value changes: /rotate N on NPCs/mobs now faces N degrees (was NaN);
buildings past 180 degrees now face the given angle; npc_rotation and
mob_rotation saved by /rotate hold cos of half the yaw instead of the raw
input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 06:43:28 -04:00
..
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2023-07-15 09:23:48 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2023-07-15 09:23:48 -04:00
2026-07-26 19:08:44 -04:00
2023-07-15 09:23:48 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2024-05-12 13:36:47 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2023-07-15 09:23:48 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00
2026-07-26 19:08:44 -04:00