mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
fix(minimap): keep a single player direction indicator
This commit is contained in:
parent
5b195781ad
commit
76f54bbd2c
2 changed files with 16 additions and 23 deletions
|
|
@ -15881,27 +15881,6 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) {
|
|||
return true;
|
||||
};
|
||||
|
||||
// Player position marker — always drawn at minimap center with a directional arrow.
|
||||
{
|
||||
// The player is always at centerX, centerY on the minimap.
|
||||
// Draw a yellow arrow pointing in the player's facing direction.
|
||||
glm::vec3 fwd = camera->getForward();
|
||||
float facing = std::atan2(fwd.y, -fwd.x); // clockwise bearing from North
|
||||
float cosF = std::cos(facing - bearing);
|
||||
float sinF = std::sin(facing - bearing);
|
||||
float arrowLen = 8.0f;
|
||||
float arrowW = 4.0f;
|
||||
ImVec2 tip(centerX + sinF * arrowLen, centerY - cosF * arrowLen);
|
||||
ImVec2 left(centerX - cosF * arrowW - sinF * arrowLen * 0.3f,
|
||||
centerY - sinF * arrowW + cosF * arrowLen * 0.3f);
|
||||
ImVec2 right(centerX + cosF * arrowW - sinF * arrowLen * 0.3f,
|
||||
centerY + sinF * arrowW + cosF * arrowLen * 0.3f);
|
||||
drawList->AddTriangleFilled(tip, left, right, IM_COL32(255, 220, 0, 255));
|
||||
drawList->AddTriangle(tip, left, right, IM_COL32(0, 0, 0, 180), 1.0f);
|
||||
// White dot at player center
|
||||
drawList->AddCircleFilled(ImVec2(centerX, centerY), 2.5f, IM_COL32(255, 255, 255, 220));
|
||||
}
|
||||
|
||||
// Build sets of entries that are incomplete objectives for tracked quests.
|
||||
// minimapQuestEntries: NPC creature entries (npcOrGoId > 0)
|
||||
// minimapQuestGoEntries: game object entries (npcOrGoId < 0, stored as abs value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue