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

* add movementflags directly instead of sending a opcode
This commit is contained in:
Ovahlord committed 2018-04-08 18:54:49 +02:00
1 parent 2aeed48a69
commit a1f5d206e5
2 files changed
+9 -7

No files matched your search

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