mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
fix: stand-up-on-move and nameplate position tracking
Camera controller / sitting: - Any movement key (WASD/QE/Space) pressed while sitting now clears the sitting flag immediately, matching WoW's sit-to-stand-on-move behaviour - Added StandUpCallback: when the player stands up via local input the callback fires setStandState(0) → CMSG_STAND_STATE_CHANGE(STAND) so the server releases the sit lock and restores normal movement - Fixes character getting stuck in sit state after accidentally right-clicking a chair GO in Goldshire Inn (or similar) Nameplates: - Use getRenderPositionForGuid() (renderer visual position) as primary source for nameplate anchor, falling back to entity X/Y/Z only when no render instance exists yet; keeps health bars in sync with the rendered model instead of the parallel entity interpolator
This commit is contained in:
parent
48d15fc653
commit
564a286282
4 changed files with 34 additions and 8 deletions
|
|
@ -5108,9 +5108,13 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) {
|
|||
// Player nameplates are always shown; NPC nameplates respect the V-key toggle
|
||||
if (!isPlayer && !showNameplates_) 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()));
|
||||
// Prefer the renderer's actual instance position so the nameplate tracks the
|
||||
// rendered model exactly (avoids drift from the parallel entity interpolator).
|
||||
glm::vec3 renderPos;
|
||||
if (!core::Application::getInstance().getRenderPositionForGuid(guid, renderPos)) {
|
||||
renderPos = core::coords::canonicalToRender(
|
||||
glm::vec3(unit->getX(), unit->getY(), unit->getZ()));
|
||||
}
|
||||
renderPos.z += 2.3f;
|
||||
|
||||
// Cull distance: target or other players up to 40 units; NPC others up to 20 units
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue