2015-06-07 20:00:43 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Check if the player can sit down.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Seat <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can Sit Down <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-09-26 23:20:40 +00:00
|
|
|
* [seat] call ace_sitting_fnc_canSit
|
2015-06-07 20:00:43 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 23:20:40 +00:00
|
|
|
params ["_seat"];
|
2015-06-07 20:00:43 +00:00
|
|
|
|
2015-07-05 15:07:34 +00:00
|
|
|
// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope)
|
|
|
|
GVAR(enable) &&
|
2015-08-07 13:12:24 +00:00
|
|
|
{isNil {_seat getVariable QGVAR(seatOccupied)}} &&
|
2015-07-05 15:07:34 +00:00
|
|
|
{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}}
|