mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
a4ae61f1fc
* allow players to reload from nearSupplies * limit reloading to friendly sides * add handling for ai getting inside empty weapon * configOf for lookup * add getin handler, hammer out remaining bugs * configOf lookup * improve friendly/object filter * more configOf lookups * Capitalize settings, add ammo storage setting * remove systemChat Co-authored-by: PabstMirror <pabstmirror@gmail.com> * fix TRACE Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
24 lines
626 B
Plaintext
24 lines
626 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Handles AI Fired EH
|
|
*
|
|
* Arguments:
|
|
* Fired EH
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_staticWeapon", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
|
|
TRACE_8("firedEH:",_staticWeapon,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_gunner);
|
|
|
|
if ((!local _gunner) || {[_gunner] call EFUNC(common,isPlayer)}) exitWith {};
|
|
if (someAmmo _staticWeapon) exitWith {};
|
|
|
|
TRACE_2("need ammo",someAmmo _staticWeapon,magazinesAllTurrets _staticWeapon);
|
|
|
|
[_staticWeapon, _gunner, _weapon, _magazine] call FUNC(ai_reload);
|