Core/Creatures: swimming creatures should not be affected by gravity
* add movementflags directly instead of sending a opcode
This commit is contained in:
1 parent
2aeed48a69
commit
a1f5d206e5
2 files changed
+9
-7
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user