Merge branch 'Winter259-module-cleanup'

This commit is contained in:
ulteq 2015-05-15 15:00:03 +02:00
commit 4d88744df6
16 changed files with 20 additions and 41 deletions

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_weapon);
PARAMS_1(_weapon);
private ["_mode"];
_mode = getArray (configFile >> "CfgWeapons" >> _weapon >> "modes") select 0;

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_unit,_weapon,_muzzle);
PARAMS_3(_unit,_weapon,_muzzle);
// don't immediately switch back
if (inputAction "nextWeapon" > 0) exitWith {};

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_weapon);
PARAMS_2(_unit,_weapon);
private ["_sound"];
_sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound");

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_show);
PARAMS_1(_show);
disableSerialization;

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_unit,_weapon,_muzzle);
PARAMS_3(_unit,_weapon,_muzzle);
private ["_safedWeapons"];
_safedWeapons = _unit getVariable [QGVAR(safedWeapons), []];

View File

@ -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"];

View File

@ -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], []];

View File

@ -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], []];

View File

@ -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);

View File

@ -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");

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
[_unit] call EFUNC(common,fixLoweredRifleAnimation);

View File

@ -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;

View File

@ -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}

View File

@ -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);

View File

@ -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"];

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_unit", "_weapon", "_magazine"];
private ["_unit","_weapon","_magazine"];
_unit = _this select 0;
_weapon = _this select 1;