When a player dies while he's in the air, the body remains in the air instead of falling down to the ground.
This bug makes resurrection spells harder and sometimes impossible to cast. Same with self resurrection.
Core rev. hash: f2e92b81a30da8150d99644c4f112bd712dbf28e
TDB: 335.49+
OS: Unix 64bit
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
confirmed. has never worked.
Confirmed. You have to meet spirit healer and get sickness.
It also affects creatures, really, really ancient bug. 1aada1f5ef14
instead of faliing down to the ground.
is the body supposed to appear in air and then fall down or it should be spawned on the ground already ?
all auras are already removed on death, player is never flying in this case
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -5217,7 +5217,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
void Player::KillPlayer()
{
- if (IsFlying() && !GetTransport())
+ if (!GetTransport())
GetMotionMaster()->MoveFall();
SetMovement(MOVE_ROOT);
I am not sure about players, maybe someone can try this on retail...
But flying creatures have to fall to ground on death.
http://www.youtube.com/watch?feature=player_detailpage&v=T1APOSl6Seo#t=170
@joschiwald any update on the issue and on your patch ?
Cannot reproduce on rev. 68c4ea314443, every time I die in the air the corpse fall down.
jackpoz commented on 1 Mar 2014 :
is the body supposed to appear in air and then fall down or it should be spawned on the ground already ?
The body is supposed to fall to the ground. I just tested this on rev. 562da2e8b2b0 2015-05-31 01:01:55 +0200 (3.3.5 branch) (Win64, Release), used a level 64 horde DK character and a level 64 alliance hunter character on the ground, firing at the DK. When the DK died, he lost the flying mount aura and fell down. Then again, when testing a duel between 2 characters, either 2x horde or horde + alliance, the character mounted on the flying mount stayed in the air when defeated, while the duel flag floated up to the defeated character.
While this test seems inconclusive, I flew to Skettis in Terokkar Forest to look for flying enemies. Using the command .die on the Monstrous Kaliri birds, they fall down when killed. Also testing the character on a flying mount, I let my character get killed by those NPCs and the dead character fell to the ground (repeatedly).
If there are other ways to test this issue, please explain what to test to replicate the issue properly.
Edit: I tested killing Kael'thas Sunstrider in his flying/floating phase in The Eye, he stayed up there.
Then again, I suppose that it is highly unlikely that a raid would be able to take him down in that phase.
tkrokli, jackpoz asked if the body is supposed to do one or the other thing on live severs, actually, what it did in 3.3.5a live, not what happens in TC. :)
Someone should also test following scenario. Fly high, really high, or get to some high grounds, and dismount or jump down. I remember that many times your corpse would not spawn on the spot you died on the ground, rather in the air, sometimes making it impossible to resurrect. I can't do test myself atm.
Well, if he wanted to ask what happens on live servers, he could have said so. Is my testing invalid?
I conferred with Aokromes on this, though he told me that this is very, very difficult to test, because you need to be 3 players on a very low latency connection to verify this in a satisfactory manner. If it is not enough to verify this against @Dexie's original post, then this issue will stay open for years to come.
As for creature bodies, it's really easy to test it on the eye's kaelthas on fly phase.
Reproduced on 35f2f5530abc.
Not tested and not sure if this is correct:
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index ef92797..eba8180 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1536,8 +1536,7 @@ void Creature::setDeathState(DeathState s)
if (m_formation && m_formation->getLeader() == this)
m_formation->FormationReset(true);
- if ((CanFly() || IsFlying()))
- GetMotionMaster()->MoveFall();
+ GetMotionMaster()->MoveFall();
Unit::setDeathState(CORPSE);
}
any news?
Not all creatures should fall on death (see Kologarn for example)
Anything here is valid? if yes, plz open a pr for it.
The remaining issue is flying npc remains in the air once dead if they have "CanFly" instead of "DisableGravity".
yeah i got one report yesterday of onixia's body being on air because it was killed to fast.
fixed like this:
this is weird as bool needsFalling must be true for creature with "CanFly" movement, it works correctly for npcs with "DisableGravity"
``` diff
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index c3a46e44a2..d5450c6a47 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1934,9 +1934,7 @@ void Creature::setDeathState(DeathState s)
bool needsFalling = IsFlying() || IsHovering();
SetHover(false);
-
Unit::setDeathState(CORPSE);
}
Reason for that is simple
https://github.com/TrinityCore/TrinityCore/blob/70cefbe86616aa6411a85e1622c82c12a1ca67fa/src/server/game/Entities/Unit/Unit.h#L1636
It checks FLYING instead of CAN_FLY flag
Its kind of a weird situation but FLYING flag is set only for players that are in air and have CAN_FLY flag while creatures also use CAN_FLY but never get FLYING one (and this is blizzlike)
In this case we need to add CanFly() to needsFalling or just replace IsFlying() ?
Most helpful comment
Not all creatures should fall on death (see Kologarn for example)