From 6fb22ebd116d9ab1973ff3c4e1fa74451860be9b Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 11 Sep 2015 17:55:28 +0200 Subject: [PATCH] Added isNull check to PFH for explicity --- addons/sitting/functions/fnc_sit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 986db36316..5e9c36947e 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -78,8 +78,8 @@ _seatPosOrig = getPosASL _seat; TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(isSitting), false)]); }; - // Stand up if chair moves or gets deleted (getPosASL returns [0,0,0] in that case) - if !((getPosASL _seat) isEqualTo _seatPosOrig) exitWith { + // Stand up if chair gets deleted or moved + if (isNull _seat || !((getPosASL _seat) isEqualTo _seatPosOrig)) exitWith { _player call FUNC(stand); TRACE_2("Chair moved",getPosASL _seat,_seatPosOrig); };