mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Fix game object sign orientation and restrict nameplates to target only
Game object M2 models share the same default facing (+renderX) as character models, so apply the same π/2 offset instead of π when computing renderYawM2go from canonical yaw. This corrects street signs and hanging shop signs that were 90° off after the server-yaw formula fix. Nameplates (health bar + name label) are now only rendered for the currently targeted entity, matching WoW's default UI behaviour and reducing visual noise.
This commit is contained in:
parent
6a681bcf67
commit
18e6c2e767
2 changed files with 6 additions and 1 deletions
|
|
@ -4718,6 +4718,9 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) {
|
|||
auto* unit = dynamic_cast<game::Unit*>(entityPtr.get());
|
||||
if (!unit || unit->getMaxHealth() == 0) continue;
|
||||
|
||||
// Only show nameplate for the currently targeted unit
|
||||
if (guid != targetGuid) continue;
|
||||
|
||||
// Convert canonical WoW position → render space, raise to head height
|
||||
glm::vec3 renderPos = core::coords::canonicalToRender(
|
||||
glm::vec3(unit->getX(), unit->getY(), unit->getZ()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue