mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
commit
55d066d122
@ -223,6 +223,7 @@ PREP(getTurretCopilot);
|
|||||||
PREP(getDoorTurrets);
|
PREP(getDoorTurrets);
|
||||||
PREP(getTurretsFFV);
|
PREP(getTurretsFFV);
|
||||||
PREP(getTurretsOther);
|
PREP(getTurretsOther);
|
||||||
|
PREP(hasHatch);
|
||||||
|
|
||||||
// missing inventory commands
|
// missing inventory commands
|
||||||
PREP(binocularMagazine);
|
PREP(binocularMagazine);
|
||||||
|
35
addons/common/functions/fnc_hasHatch.sqf
Normal file
35
addons/common/functions/fnc_hasHatch.sqf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Check if unit is in a vehicle position where it can turn in or out.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Unit has a hatch? <BOOL>
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
local _vehicle = vehicle _unit;
|
||||||
|
|
||||||
|
if (_unit == _vehicle) exitWith {false};
|
||||||
|
|
||||||
|
local _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
|
if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false};
|
||||||
|
|
||||||
|
if (_unit == driver _vehicle) exitWith {
|
||||||
|
getNumber (_config >> "forceHideDriver") == 0; // return
|
||||||
|
};
|
||||||
|
|
||||||
|
local _turret = [_unit] call FUNC(getTurretIndex);
|
||||||
|
|
||||||
|
if (_turret isEqualTo []) exitWith {false};
|
||||||
|
|
||||||
|
local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
getNumber (_turretConfig >> "forceHideGunner") == 0; // return
|
Loading…
Reference in New Issue
Block a user