feat: world-space floating combat text above entities

Combat text (damage, heals, misses, crits, etc.) now floats above the
target entity in 3D space instead of appearing at fixed screen positions.
Text rises upward from the entity's head, with random horizontal stagger
to prevent stacking. HUD-only types (XP, Honor, Procs) and entries
without a valid entity anchor fall back to the original screen overlay.
This commit is contained in:
Kelsi 2026-03-18 09:54:52 -07:00
parent 6aea48aea9
commit 63b4394e3e
3 changed files with 308 additions and 230 deletions

View file

@ -61,6 +61,9 @@ struct CombatTextEntry {
float age = 0.0f; // Seconds since creation (for fadeout)
bool isPlayerSource = false; // True if player dealt this
uint8_t powerType = 0; // For ENERGIZE/POWER_DRAIN: 0=mana,1=rage,2=focus,3=energy,6=runicpower
uint64_t srcGuid = 0; // Source entity (attacker/caster)
uint64_t dstGuid = 0; // Destination entity (victim/target) — used for world-space positioning
float xSeed = 0.0f; // Random horizontal offset seed (-1..1) to stagger overlapping text
static constexpr float LIFETIME = 2.5f;
bool isExpired() const { return age >= LIFETIME; }