mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Core/Vehicles: disable passenger gravity also for vehicles that can fly by default
This commit is contained in:
@@ -563,7 +563,7 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit)
|
||||
_me->SetFlag(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK));
|
||||
|
||||
// Enable gravity for passenger when he did not have it active before entering the vehicle
|
||||
if (seat->second.SeatInfo->HasFlag(VEHICLE_SEAT_FLAG_DISABLE_GRAVITY))
|
||||
if (seat->second.SeatInfo->HasFlag(VEHICLE_SEAT_FLAG_DISABLE_GRAVITY) || GetBase()->CanFly())
|
||||
unit->SetDisableGravity(false);
|
||||
|
||||
// Remove UNIT_FLAG_NOT_SELECTABLE if passenger did not have it before entering vehicle
|
||||
@@ -900,7 +900,7 @@ bool VehicleJoinEvent::Execute(uint64, uint32)
|
||||
player->UnsummonPetTemporaryIfAny();
|
||||
}
|
||||
|
||||
if (veSeat->HasFlag(VEHICLE_SEAT_FLAG_DISABLE_GRAVITY))
|
||||
if (veSeat->HasFlag(VEHICLE_SEAT_FLAG_DISABLE_GRAVITY) || Target->GetBase()->CanFly())
|
||||
Passenger->SetDisableGravity(true);
|
||||
|
||||
if (veSeat->HasFlag(VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE))
|
||||
|
||||
Reference in New Issue
Block a user