2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2022-03-07 18:29:19 +00:00
|
|
|
/*
|
2024-07-27 17:42:31 +00:00
|
|
|
* Author: LinkIsGrim
|
|
|
|
* Handles AI GetIn on an empty CSW.
|
2022-03-07 18:29:19 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* GetIn EH
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2024-02-07 23:36:13 +00:00
|
|
|
params ["_vehicle", "", "_gunner"];
|
|
|
|
TRACE_2("getInEH:",_vehicle,_gunner);
|
|
|
|
|
|
|
|
if (someAmmo _vehicle) exitWith {};
|
2022-03-07 18:29:19 +00:00
|
|
|
if ((!local _gunner) || {[_gunner] call EFUNC(common,isPlayer)}) exitWith {};
|
|
|
|
|
2024-02-07 23:36:13 +00:00
|
|
|
TRACE_1("need ammo",magazinesAllTurrets _vehicle);
|
2022-03-07 18:29:19 +00:00
|
|
|
|
2024-02-07 23:36:13 +00:00
|
|
|
[_vehicle, _gunner, currentWeapon _vehicle] call FUNC(ai_reload);
|