mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-04 08:07:09 +01:00
Core/Vehicles: Fix CanEnterOrExit by implying that if a vehicle seat have anim for enter/ride means it can be entered/exited even in cases where it lacks VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT flag
Fixes issues #13298, #8195, #7468, #1290
This commit is contained in:
@@ -2072,7 +2072,12 @@ struct VehicleSeatEntry
|
||||
uint32 m_flagsB; // 45
|
||||
// 46-57 added in 3.1, floats mostly
|
||||
|
||||
bool CanEnterOrExit() const { return (m_flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0; }
|
||||
bool CanEnterOrExit() const
|
||||
{
|
||||
return ((m_flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0 ||
|
||||
//If it has anmation for enter/ride, means it can be entered/exited by logic
|
||||
(m_flags & (VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER | VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE)) != 0);
|
||||
}
|
||||
bool CanSwitchFromSeat() const { return (m_flags & VEHICLE_SEAT_FLAG_CAN_SWITCH) != 0; }
|
||||
bool IsUsableByOverride() const { return (m_flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18)
|
||||
|| (m_flagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 |
|
||||
|
||||
Reference in New Issue
Block a user