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:
1 parent
4823e6e20d
commit
9b333c2b53
2 files changed
+7
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user