Core/Movement: Use SetLevitate(true/false) instead of AddUnit/RemoveUnit.
This commit is contained in:
1 parent
02525acccb
commit
5416b734e4
29 files changed
+81
-81
No files matched your search
@@ -731,12 +731,12 @@ void SmartAI::SetFly(bool fly)
|
||||
{
|
||||
if (fly)
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetLevitate(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetLevitate(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
|
||||
}
|
||||
me->SetFlying(fly);
|
||||
|
||||
Reference in new issue
Block a user