mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
6aea48aea9
commit
63b4394e3e
3 changed files with 308 additions and 230 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue