mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
fix: rest state detection and minimap north-up orientation
- WotLK opcode 0x21E is aliased to both SMSG_SET_REST_START and SMSG_QUEST_FORCE_REMOVE. In WotLK, treat as SET_REST_START (non-zero = entering rest area, zero = leaving); Classic/TBC treat as quest removal. - PLAYER_BYTES_2 rest state byte: change from `& 0x01` to `!= 0` to also detect REST_TYPE_IN_CITY (value 2), not just REST_TYPE_IN_TAVERN (1). - Minimap arrow: server orientation (π/2=North) needed conversion to minimap arrow space (0=North). Subtract π/2 in both render paths so arrow points North when player faces North.
This commit is contained in:
parent
28550dbc99
commit
2b9f216dae
2 changed files with 38 additions and 9 deletions
|
|
@ -4855,7 +4855,11 @@ void Renderer::renderWorld(game::World* world, game::GameHandler* gameHandler) {
|
|||
minimapPlayerOrientation = std::atan2(-facingFwd.x, facingFwd.y);
|
||||
hasMinimapPlayerOrientation = true;
|
||||
} else if (gameHandler) {
|
||||
minimapPlayerOrientation = gameHandler->getMovementInfo().orientation;
|
||||
// Server orientation is in WoW space: π/2 = North, 0 = East.
|
||||
// Minimap arrow expects render space: 0 = North, π/2 = East.
|
||||
// Convert: minimap_angle = server_orientation - π/2
|
||||
minimapPlayerOrientation = gameHandler->getMovementInfo().orientation
|
||||
- static_cast<float>(M_PI_2);
|
||||
hasMinimapPlayerOrientation = true;
|
||||
}
|
||||
minimap->render(cmd, *camera, minimapCenter,
|
||||
|
|
@ -4983,7 +4987,11 @@ void Renderer::renderWorld(game::World* world, game::GameHandler* gameHandler) {
|
|||
minimapPlayerOrientation = std::atan2(-facingFwd.x, facingFwd.y);
|
||||
hasMinimapPlayerOrientation = true;
|
||||
} else if (gameHandler) {
|
||||
minimapPlayerOrientation = gameHandler->getMovementInfo().orientation;
|
||||
// Server orientation is in WoW space: π/2 = North, 0 = East.
|
||||
// Minimap arrow expects render space: 0 = North, π/2 = East.
|
||||
// Convert: minimap_angle = server_orientation - π/2
|
||||
minimapPlayerOrientation = gameHandler->getMovementInfo().orientation
|
||||
- static_cast<float>(M_PI_2);
|
||||
hasMinimapPlayerOrientation = true;
|
||||
}
|
||||
minimap->render(currentCmd, *camera, minimapCenter,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue