mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8763184b6a
* Dragon work cleanup remove unused p3ds add pos_gunner_dir/pos_gunner to static add [csw] prefix to arsenal version add sight interaction icons * Update fnc_staticWeaponInit_unloadExtraMags.sqf * ace_rearm compat allows pulling carry mags out of rearm trucks * Update fnc_ai_handleFired.sqf * Re-add 3den attributes * cleanup and move A2 staticweapon strings to ace_csw
27 lines
728 B
Plaintext
27 lines
728 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: TCVM
|
|
* If the CSW is mounted or in use this will not allow you to dismount the weapon
|
|
*
|
|
* Arguments:
|
|
* 0: Static Weapon <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can Dismount <BOOL>
|
|
*
|
|
* Example:
|
|
* [cursorObject] call ace_csw_fnc_assemble_canPickupWeapon
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_staticWeapon"];
|
|
|
|
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
|
|
private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_staticWeapon getVariable [QGVAR(assemblyMode), 3]);
|
|
private _notCrewed = (crew _staticWeapon) isEqualTo [];
|
|
private _deadCrew = !(alive (gunner _staticWeapon)); // need to eject body???
|
|
|
|
_assemblyMode && {_notCrewed || _deadCrew}
|
|
|