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

This commit is contained in:
StormBytePP
2015-08-29 01:10:35 +02:00
parent dd90e51028
commit f96c08d27e

View File

@@ -1550,7 +1550,12 @@ struct VehicleSeatEntry
uint32 FlagsC; // 64
uint32 UISkinFileDataID; // 65
bool CanEnterOrExit() const { return (Flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0; }
bool CanEnterOrExit() const
{
return ((Flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0 ||
//If it has anmation for enter/ride, means it can be entered/exited by logic
(Flags & (VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER | VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE)) != 0);
}
bool CanSwitchFromSeat() const { return (Flags & VEHICLE_SEAT_FLAG_CAN_SWITCH) != 0; }
bool IsUsableByOverride() const { return (Flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18)
|| (FlagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 |