mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Fix respawned corpse movement, faction hostility, and add WoW-canonical mob level colors
Reset NPC animation to idle when health goes from 0 to >0 (respawn), prevent dead NPCs from being moved by server movement packets. Fix faction hostility to check factionGroup Monster bit and individual enemy arrays, not just enemyGroup. Add level-based mob coloring: grey (no XP), green (easy), yellow (even), orange (hard), red (very hard) for target frame and selection circle.
This commit is contained in:
parent
2aa8187562
commit
81166346ef
7 changed files with 127 additions and 9 deletions
|
|
@ -876,6 +876,13 @@ void CharacterRenderer::playAnimation(uint32_t instanceId, uint32_t animationId,
|
|||
auto& instance = it->second;
|
||||
auto& model = models[instance.modelId].data;
|
||||
|
||||
// Track death state for preventing movement while dead
|
||||
if (animationId == 1) {
|
||||
instance.isDead = true;
|
||||
} else if (instance.isDead && animationId == 0) {
|
||||
instance.isDead = false; // Respawned
|
||||
}
|
||||
|
||||
// Find animation sequence index by ID
|
||||
instance.currentAnimationId = animationId;
|
||||
instance.currentSequenceIndex = -1;
|
||||
|
|
@ -1437,6 +1444,10 @@ void CharacterRenderer::moveInstanceTo(uint32_t instanceId, const glm::vec3& des
|
|||
if (it == instances.end()) return;
|
||||
|
||||
auto& inst = it->second;
|
||||
|
||||
// Don't move dead instances (corpses shouldn't slide around)
|
||||
if (inst.isDead) return;
|
||||
|
||||
if (durationSeconds <= 0.0f) {
|
||||
// Instant move (stop)
|
||||
inst.position = destination;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue