Core/Creature: swimming creatures should not be affected by gravity

*prevent swimming creatures from being affected by falling movement generator
This commit is contained in:
Ovalord committed 2017-12-18 23:47:43 +01:00
1 parent 4823e6e20d
commit 9b333c2b53
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -14077,9 +14077,15 @@ bool Unit::SetSwim(bool enable)
return false;
if (enable)
{
AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
SetDisableGravity(true);
}
else
{
RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
SetDisableGravity(false);
}
if (enable)
Movement::PacketSender(this, SMSG_SPLINE_MOVE_START_SWIM, NULL_OPCODE).Send();