2015-07-05 15:07:34 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Checks if chair moved from original position.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Seat <OBJECT>
|
|
|
|
* 1: Seat Position <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-08-07 13:12:24 +00:00
|
|
|
* [seat, seatPos] call ace_sitting_fnc_hasChairMoved
|
2015-07-05 15:07:34 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-07 13:12:24 +00:00
|
|
|
params ["_seat", "_seatPosOrig"];
|
2015-07-05 15:07:34 +00:00
|
|
|
|
|
|
|
TRACE_2("Chair position",_seatPosOrig,getPosASL _seat);
|
|
|
|
|
2015-08-07 13:12:24 +00:00
|
|
|
(getPosASL _seat) params ["_seatX", "_seatY", "_seatZ"];
|
|
|
|
_seatPosOrig params ["_seatOrigX", "_seatOrigY", "_seatOrigZ"];
|
|
|
|
|
2015-07-05 15:07:34 +00:00
|
|
|
// Check each coordinate due to possibility of tiny movements in simulation
|
2015-08-07 13:12:24 +00:00
|
|
|
if (abs (_seatX - _seatOrigX) > 0.01) exitWith {true};
|
|
|
|
if (abs (_seatY - _seatOrigY) > 0.01) exitWith {true};
|
|
|
|
if (abs (_seatZ - _seatOrigZ) > 0.01) exitWith {true};
|
|
|
|
false
|