From ed44c0d44552bee94d808a8c0520dd68bd1506a2 Mon Sep 17 00:00:00 2001 From: Salluci Date: Thu, 13 Jul 2023 13:20:21 +0300 Subject: [PATCH] more headers --- .../fnc_aceRearmGetCarryMagazines.sqf | 2 +- addons/csw/functions/fnc_ai_handleGetIn.sqf | 14 +++++++------- addons/csw/functions/fnc_ai_reload.sqf | 18 +++++++++--------- addons/csw/functions/fnc_getIn.sqf | 8 ++++---- addons/csw/functions/fnc_proxyWeapon.sqf | 2 +- .../csw/functions/fnc_reload_actionsLoad.sqf | 2 +- .../csw/functions/fnc_reload_actionsUnload.sqf | 2 +- .../fnc_reload_getVehicleMagazine.sqf | 2 +- .../csw/functions/fnc_reload_loadMagazine.sqf | 4 ++-- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/csw/functions/fnc_aceRearmGetCarryMagazines.sqf b/addons/csw/functions/fnc_aceRearmGetCarryMagazines.sqf index ac51d03347..ac833d64fd 100644 --- a/addons/csw/functions/fnc_aceRearmGetCarryMagazines.sqf +++ b/addons/csw/functions/fnc_aceRearmGetCarryMagazines.sqf @@ -4,7 +4,7 @@ * Helper function for ace_rearm; Gets magazines that should be loaded by csw * * Arguments: - * 0: Vehicle + * 0: CSW * 1: Specific Turret or pass bool to check all turrets (default: true) * * Return Value: diff --git a/addons/csw/functions/fnc_ai_handleGetIn.sqf b/addons/csw/functions/fnc_ai_handleGetIn.sqf index 94d43e4691..f8d89c9796 100644 --- a/addons/csw/functions/fnc_ai_handleGetIn.sqf +++ b/addons/csw/functions/fnc_ai_handleGetIn.sqf @@ -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); diff --git a/addons/csw/functions/fnc_ai_reload.sqf b/addons/csw/functions/fnc_ai_reload.sqf index 2c45c9b650..b3429c1167 100644 --- a/addons/csw/functions/fnc_ai_reload.sqf +++ b/addons/csw/functions/fnc_ai_reload.sqf @@ -4,7 +4,7 @@ * Handles AI reloading * * Arguments: - * 0: Static Weapon + * 0: CSW * 1: Gunner * 2: Weapon * @@ -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); diff --git a/addons/csw/functions/fnc_getIn.sqf b/addons/csw/functions/fnc_getIn.sqf index 9a11553ce9..75485d1025 100644 --- a/addons/csw/functions/fnc_getIn.sqf +++ b/addons/csw/functions/fnc_getIn.sqf @@ -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 + * 0: CSW * 1: Unit * * 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]]; diff --git a/addons/csw/functions/fnc_proxyWeapon.sqf b/addons/csw/functions/fnc_proxyWeapon.sqf index 2ad18406cf..1557ae4fe6 100644 --- a/addons/csw/functions/fnc_proxyWeapon.sqf +++ b/addons/csw/functions/fnc_proxyWeapon.sqf @@ -4,7 +4,7 @@ * Handles the use of proxy weapons to fix engine-reload times * * Arguments: - * 0: Weapon + * 0: CSW * 1: Turret * 2: Proxy weapon needed * 2: Weapon should be emptied diff --git a/addons/csw/functions/fnc_reload_actionsLoad.sqf b/addons/csw/functions/fnc_reload_actionsLoad.sqf index a5387813ce..7a1f49980e 100644 --- a/addons/csw/functions/fnc_reload_actionsLoad.sqf +++ b/addons/csw/functions/fnc_reload_actionsLoad.sqf @@ -4,7 +4,7 @@ * Gets sub actions for what the player can load into the CSW * * Arguments: - * 0: Target + * 0: CSW * 1: Player * * Return Value: diff --git a/addons/csw/functions/fnc_reload_actionsUnload.sqf b/addons/csw/functions/fnc_reload_actionsUnload.sqf index 043683e37f..118072b8c2 100644 --- a/addons/csw/functions/fnc_reload_actionsUnload.sqf +++ b/addons/csw/functions/fnc_reload_actionsUnload.sqf @@ -4,7 +4,7 @@ * Gets sub actions for what the player can unload from the CSW * * Arguments: - * 0: Target + * 0: CSW * 1: Player * * Return Value: diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index f8053df3b9..3668469f9f 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -4,7 +4,7 @@ * Finds the best vehicle magazines to create from a carryable magazine for a given weapon. * * Arguments: - * 0: Vehicle + * 0: CSW * 1: Turret * 2: Magazine that is carryable * diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 26df08d1ac..03f8cb86b7 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -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 + * 0: CSW * 1: Turret * 2: Unit Carried Magazine * 3: Magazine source