mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10: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
|
|
@ -15560,6 +15560,12 @@ void GameHandler::addCombatText(CombatTextEntry::Type type, int32_t amount, uint
|
|||
entry.age = 0.0f;
|
||||
entry.isPlayerSource = isPlayerSource;
|
||||
entry.powerType = powerType;
|
||||
entry.srcGuid = srcGuid;
|
||||
entry.dstGuid = dstGuid;
|
||||
// Random horizontal stagger so simultaneous hits don't stack vertically
|
||||
static std::mt19937 rng(std::random_device{}());
|
||||
std::uniform_real_distribution<float> dist(-1.0f, 1.0f);
|
||||
entry.xSeed = dist(rng);
|
||||
combatText.push_back(entry);
|
||||
|
||||
// Persistent combat log — use explicit GUIDs if provided, else fall back to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue