Remove unused variables, spaces

This commit is contained in:
VKing 2015-12-17 09:13:23 +01:00
parent d8c8d02177
commit a0fdc58ed7
7 changed files with 14 additions and 17 deletions

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {"ACE_RangeTable_82mm","ace_mortar_82mm"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author[] = {"PabstMirror"};
author[] = {"PabstMirror","Grey","VKing"};
authorUrl = "https://github.com/acemod";
VERSION_CONFIG;
};

View File

@ -19,7 +19,7 @@
#include "script_component.hpp"
params ["_static","_unit",["_magazineClassOptional","",[""]]];
private ["_canLoadMagazine","_currentMagazine","_weapon","_magazines","_listOfMagNames",
private ["_canLoadMagazine","_currentMagazine","_weapon","_listOfMagNames",
"_hasCompatibleMagazine","_count"];
if !(alive _static) exitWith {false};
@ -29,7 +29,6 @@ _canLoadMagazine = false;
_currentMagazine = (magazinesAllTurrets _static) select 1;
_weapon = (_static weaponsTurret [0]) select 0;
_magazines = magazines _unit;
_listOfMagNames = getArray(configFile >> "cfgWeapons" >> _weapon >> "magazines");
_hasCompatibleMagazine = false;
_count = 0;
@ -41,7 +40,7 @@ if (_magazineClassOptional != "") then {
};
}else{
{
if ([_unit,_x] call EFUNC(common,hasMagazine)) exitWith {_hasCompatibleMagazine = true;};
if ([_unit,_x] call EFUNC(common,hasMagazine)) exitWith {_hasCompatibleMagazine = true};
} forEach _listOfMagNames;
};
//If static weapon has a magazine then find the ammo count

View File

@ -28,6 +28,7 @@ _currentMagazineClass = _currentMagazine select 0;
_count = _currentMagazine select 2;
//Check all of the players magazines to see if they are compatible with the static weapon. First magazine that is compatible is chosen
//VKing: This section ought to be double checked.
_magazines = magazines _unit;
_magazineDetails = magazinesDetail _unit;
_listOfMagNames = getArray(configFile >> "cfgWeapons" >> _weapon >> "magazines");
@ -50,7 +51,6 @@ if (_magazineClassDetails != "") then{
_parsed = _magazineClassDetails splitString "([]/: )";
_parsed params ["_type", "", "", "_roundsLeftText", "_maxRoundsText"];
_roundsLeft = parseNumber _roundsLeftText;
_roundsMax = parseNumber _maxRoundsText;
_magType = _type;
};

View File

@ -20,10 +20,9 @@
params ["_static","_unit","_timeToLoad",["_magazineClassOptional","",[""]]];
private _progressText = localize LSTRING(loadingMortar);
//Move player into animation if player is standing
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
[_unit, "AmovPercMstpSrasWrflDnon_diary", 1] call EFUNC(common,doAnimation);
};
[_timeToLoad, [_static,_unit,_magazineClassOptional], {(_this select 0) call FUNC(loadMagazine);}, {}, _progressText] call EFUNC(common,progressBar);
[_timeToLoad, [_static,_unit,_magazineClassOptional], {(_this select 0) call FUNC(loadMagazine)}, {}, localize LSTRING(loadingMortar)] call EFUNC(common,progressBar);

View File

@ -18,10 +18,9 @@
#include "script_component.hpp"
params ["_static","_unit"];
private ["_weapon","_currentMagazine","_currentMagazineClass","_ammoCount"];
private ["_currentMagazine","_currentMagazineClass","_ammoCount"];
//Get weapon & magazine information about static weapon
_weapon = (_static weaponsTurret [0]) select 0;
_currentMagazine = (magazinesAllTurrets _static) select 1;
_currentMagazineClass = _currentMagazine select 0;
_ammoCount = _currentMagazine select 2;
@ -31,6 +30,8 @@ if (_ammoCount == 0) then {
[QGVAR(removeMagazine), [_static, _currentMagazineClass]] call EFUNC(common,globalEvent);
}else {
_pos = _unit modelToWorldVisual [0,1,0];
// TODO: Check unit inventory space and add to inventory first, then drop
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
_unit addMagazineAmmoCargo [_currentMagazineClass, 1, _ammoCount];
_unit setPosATL _pos;

View File

@ -20,11 +20,9 @@
params ["_static","_unit","_timeToUnload"];
private _progressText = localize LSTRING(unloadingMortar);
//Move player into animation if player is standing
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
[_unit, "AmovPercMstpSrasWrflDnon_diary", 1] call EFUNC(common,doAnimation);
};
[_timeToUnload, [_static,_unit], {(_this select 0) call FUNC(unloadMagazine);}, {}, _progressText] call EFUNC(common,progressBar);
[_timeToUnload, [_static,_unit], {(_this select 0) call FUNC(unloadMagazine)}, {}, localize LSTRING(unloadingMortar)] call EFUNC(common,progressBar);