diff options
| author | StormBytePP <stormbyte@gmail.com> | 2015-08-29 00:40:05 +0200 |
|---|---|---|
| committer | StormBytePP <stormbyte@gmail.com> | 2015-08-29 01:04:44 +0200 |
| commit | ac2845ee77d0f3e838267ad424fbcf4894040333 (patch) | |
| tree | 75d6589df1f0721a6e4528aa94475a957e1d90dc | |
| parent | 5c97594a1691b78ab881437985dc5eeebb31a979 (diff) | |
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
| -rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 5ccd5d2b7e5..c680494cd72 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -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 | |
