diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf index 9b596733acb..5c8ea3be549 100644 --- a/addons/sitting/functions/fnc_canSit.sqf +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -22,8 +22,12 @@ params ["_seat", "_player", ["_seatPos", 0]]; // Sitting enabled, not occupied and standing up (or not on a big slope) XGVAR(enable) && {isNil {_player getVariable QGVAR(sittingStatus)}} && -{ +{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} && { private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []]; - _seatsClaimed isEqualTo [] || {isNull (_seatsClaimed select _seatPos)} -} && -{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} + + (_seatsClaimed isEqualTo [] || {isNull (_seatsClaimed select _seatPos)}) && { + ([_player, _seat] call EFUNC(common,canInteractWith)) || // not claimed (common case) + // Can self-interact and chair claimed by another sitter + {([_player, objNull] call EFUNC(common,canInteractWith)) && {(_seatsClaimed findIf {!isNull _x}) != -1}} + } +}