mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
24 lines
543 B
Plaintext
24 lines
543 B
Plaintext
/*
|
|
* Author: Jonpas
|
|
* Check if the player can sit down.
|
|
*
|
|
* Arguments:
|
|
* 0: Seat <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can Sit Down <BOOL>
|
|
*
|
|
* Example:
|
|
* [seat] call ace_sitting_fnc_canSit
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_seat"];
|
|
|
|
// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope)
|
|
GVAR(enable) &&
|
|
{isNil {_seat getVariable QGVAR(seatOccupied)}} &&
|
|
{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}}
|