2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2022-03-07 18:29:19 +00:00
|
|
|
/*
|
2023-06-19 13:31:17 +00:00
|
|
|
* Author: Grim
|
2022-03-07 18:29:19 +00:00
|
|
|
* Handles AI GetIn on an empty weapon
|
|
|
|
*
|
|
|
|
* 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);
|