mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
more headers
This commit is contained in:
parent
6c2a8a2117
commit
ed44c0d445
@ -4,7 +4,7 @@
|
||||
* Helper function for ace_rearm; Gets magazines that should be loaded by csw
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Specific Turret or pass bool to check all turrets <ARRAY><BOOL>(default: true)
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: LinkIsGrim
|
||||
* Handles AI GetIn on an empty weapon
|
||||
* Handles AI GetIn on an empty CSW
|
||||
*
|
||||
* Arguments:
|
||||
* GetIn EH
|
||||
@ -11,11 +11,11 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
params ["_staticWeapon", "_role", "_gunner", "_turret"];
|
||||
TRACE_3("getInEH:",_staticWeapon,_role,_gunner);
|
||||
params ["_vehicle", "_role", "_gunner", "_turret"];
|
||||
TRACE_3("getInEH:",_vehicle,_role,_gunner);
|
||||
|
||||
if ((!local _gunner) || {[_gunner] call EFUNC(common,isPlayer)}) exitWith {};
|
||||
if (someAmmo _staticWeapon) exitWith {};
|
||||
if (someAmmo _vehicle) exitWith {};
|
||||
|
||||
// turret can be empty when AI is forcefully moved to the vehicle
|
||||
if (_turret isEqualTo []) then {
|
||||
@ -23,7 +23,7 @@ if (_turret isEqualTo []) then {
|
||||
};
|
||||
|
||||
// this doesn't handle multi-weapon turrets, need a "turretWeapon" event or a PFH to do that
|
||||
private _weapon = (_staticWeapon weaponsTurret _turret) select 0;
|
||||
TRACE_4("need ammo",someAmmo _staticWeapon,magazinesAllTurrets _staticWeapon,_turret,_weapon);
|
||||
private _weapon = (_vehicle weaponsTurret _turret) select 0;
|
||||
TRACE_4("need ammo",someAmmo _vehicle,magazinesAllTurrets _vehicle,_turret,_weapon);
|
||||
|
||||
[_staticWeapon, _gunner, _weapon] call FUNC(ai_reload);
|
||||
[_vehicle, _gunner, _weapon] call FUNC(ai_reload);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Handles AI reloading
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Static Weapon <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Gunner <OBJECT>
|
||||
* 2: Weapon <STRING>
|
||||
*
|
||||
@ -13,11 +13,11 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
params ["_staticWeapon", "_gunner", "_weapon"];
|
||||
TRACE_3("AI reload",_staticWeapon,_gunner,_weapon);
|
||||
params ["_vehicle", "_gunner", "_weapon"];
|
||||
TRACE_3("AI reload",_vehicle,_gunner,_weapon);
|
||||
|
||||
private _loadableMagazines = [_staticWeapon, _gunner, true] call FUNC(reload_getLoadableMagazines);
|
||||
if (_loadableMagazines isEqualTo []) exitWith {TRACE_1("could not find reloadable mag",_staticWeapon)};
|
||||
private _loadableMagazines = [_vehicle, _gunner, true] call FUNC(reload_getLoadableMagazines);
|
||||
if (_loadableMagazines isEqualTo []) exitWith {TRACE_1("could not find reloadable mag",_vehicle)};
|
||||
|
||||
private _bestAmmo = 0;
|
||||
private _magazineInfo = [];
|
||||
@ -36,14 +36,14 @@ _magazineInfo params ["_carryMag", "_turretPath", "_loadInfo", "_magSource", "",
|
||||
|
||||
// see fnc_reload_loadMagazine #L54
|
||||
// AI never returns ammo and removes the magazine before reloading, so we can skip distance and weaponHolder checks
|
||||
private _eventParams = [_staticWeapon, _turretPath, objNull, _carryMag, _ammo, _gunner];
|
||||
private _eventParams = [_vehicle, _turretPath, objNull, _carryMag, _ammo, _gunner];
|
||||
|
||||
private _timeToLoad = GET_NUMBER(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime", 1);
|
||||
private _timeToLoad = GET_NUMBER(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime", 1);
|
||||
|
||||
TRACE_1("Reloading in progress",_timeToLoad);
|
||||
[{
|
||||
params ["_staticWeapon", "", "", "", "", "_gunner"];
|
||||
if !(alive _staticWeapon && {alive _gunner}) exitWith {TRACE_2("invalid state",alive _staticWeapon,alive _gunner);};
|
||||
params ["_vehicle", "", "", "", "", "_gunner"];
|
||||
if !(alive _vehicle && {alive _gunner}) exitWith {TRACE_2("invalid state",alive _vehicle,alive _gunner);};
|
||||
|
||||
// Reload the static weapon
|
||||
TRACE_1("calling addTurretMag event: AI reload",_this);
|
||||
|
@ -6,7 +6,7 @@
|
||||
* the gun and can't be acssesed from the back, I am implementing this to get around that issue.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Static Weapon <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
@ -18,7 +18,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_staticWeapon", "_player"];
|
||||
TRACE_2("getIn",_staticWeapon,_player);
|
||||
params ["_vehicle", "_player"];
|
||||
TRACE_2("getIn",_vehicle,_player);
|
||||
|
||||
_player moveInTurret [_staticWeapon, [0]];
|
||||
_player moveInTurret [_vehicle, [0]];
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Handles the use of proxy weapons to fix engine-reload times
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Weapon <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Turret <ARRAY>
|
||||
* 2: Proxy weapon needed <BOOL>
|
||||
* 2: Weapon should be emptied <BOOL>
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Gets sub actions for what the player can load into the CSW
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Gets sub actions for what the player can unload from the CSW
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Finds the best vehicle magazines to create from a carryable magazine for a given weapon.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Turret <ARRAY>
|
||||
* 2: Magazine that is carryable <STRING>
|
||||
*
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Loads a magazine into a static weapon from a magazine carried by or next to the player.
|
||||
* Loads a magazine into a CSW from a magazine carried by or next to the player.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 0: CSW <OBJECT>
|
||||
* 1: Turret <ARRAY>
|
||||
* 2: Unit Carried Magazine <STRING>
|
||||
* 3: Magazine source <OBJECT>
|
||||
|
Loading…
Reference in New Issue
Block a user