mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Weaponselect module macro cleanup
This commit is contained in:
parent
82e4bd0c13
commit
7c099c1009
@ -12,12 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_magazine", "_numberofMagazines"];
|
||||
|
||||
if !(GVAR(DisplayText)) exitwith {};
|
||||
|
||||
_magazine = _this select 0;
|
||||
_numberofMagazines = _this select 1;
|
||||
PARAMS_2(_magazine,_numberofMagazines);
|
||||
|
||||
private ["_color", "_name", "_text", "_picture"];
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
private ["_type", "_allMags", "_allMuzzles", "_magazines"];
|
||||
|
||||
_type = _this select 0; //"All", "Frag" or "NonFrag"
|
||||
PARAMS_1(_type); //"All", "Frag" or "NonFrag"
|
||||
|
||||
_allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []];
|
||||
_allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []];
|
||||
|
@ -1,9 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_type", "_allMags", "_allMuzzles", "_magazines"];
|
||||
private ["_allMags", "_allMuzzles", "_magazines"];
|
||||
|
||||
_type = _this select 0; //"All", "Frag" or "NonFrag"
|
||||
PARAMS_1(_type); //"All", "Frag" or "NonFrag"
|
||||
|
||||
_allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []];
|
||||
_allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []];
|
||||
|
@ -1,9 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turret", "_weapons"];
|
||||
private ["_turret", "_weapons"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turret = [_vehicle] call EFUNC(common,getTurretCommander);
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon", "_sound"];
|
||||
private ["_sound"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
_sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound");
|
||||
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
|
||||
|
@ -11,10 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
if (_weapon == "") exitWith {};
|
||||
|
||||
@ -32,7 +29,6 @@ private ["_muzzles", "_modes"];
|
||||
_muzzles = [_weapon] call EFUNC(common,getWeaponMuzzles);
|
||||
_modes = [_weapon] call EFUNC(common,getWeaponModes);
|
||||
|
||||
|
||||
private ["_index", "_muzzle", "_mode"];
|
||||
|
||||
_index = (_modes find currentWeaponMode _unit) + 1;
|
||||
|
@ -11,10 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
if (_weapon == "") exitWith {};
|
||||
|
||||
@ -40,7 +37,6 @@ if (_index > count _muzzles - 1) then {_index = 1};
|
||||
|
||||
_muzzle = _muzzles select _index;
|
||||
|
||||
|
||||
_index = 0;
|
||||
while {
|
||||
_index < 100 && {currentMuzzle _unit != _muzzle}
|
||||
|
@ -1,11 +1,7 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_vehicle", "_index"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
_index = _this select 2;
|
||||
PARAMS_3(_unit,_vehicle,_index);
|
||||
|
||||
private "_turret";
|
||||
_turret = [_unit] call EFUNC(common,getTurretIndex);
|
||||
|
@ -12,10 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_muzzle"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_muzzle = _this select 1;
|
||||
PARAMS_2(_unit,_muzzle);
|
||||
|
||||
private ["_uniformMags", "_vestMags", "_backpackMags", "_i", "_uniformMagsToRemove", "_vestMagsToRemove", "_backpackMagsToRemove", "_firstMagazine", "_throwMuzzleNames"];
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon", "_magazine"];
|
||||
private ["_magazine"];
|
||||
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_magazine = _this select 5;
|
||||
|
||||
if (_weapon != "Throw") exitWith {};
|
||||
|
Loading…
Reference in New Issue
Block a user