ACE3/addons/csw/functions/fnc_ai_handleGetIn.sqf
Grim ee79decb45
CSW - Code cleanup (#9777)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-02-07 20:36:13 -03:00

24 lines
480 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Grim
* Handles AI GetIn on an empty weapon
*
* Arguments:
* GetIn EH
*
* Return Value:
* None
*
* Public: No
*/
params ["_vehicle", "", "_gunner"];
TRACE_2("getInEH:",_vehicle,_gunner);
if (someAmmo _vehicle) exitWith {};
if ((!local _gunner) || {[_gunner] call EFUNC(common,isPlayer)}) exitWith {};
TRACE_1("need ammo",magazinesAllTurrets _vehicle);
[_vehicle, _gunner, currentWeapon _vehicle] call FUNC(ai_reload);