switch from params to select for single value returns when calling getWeaponData (#8672)

This commit is contained in:
Drofseh 2021-11-08 11:08:43 -08:00 committed by GitHub
parent 99c85e3c12
commit 727ac12e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,7 @@ private _fnc_onSuccess = {
};
// cool the weapon
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "", "_barrelMass"];
private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7;
_temperature = [_temperature, _barrelMass, _liquidAmount * 10] call FUNC(calculateCooling);
[_target, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic);
};

View File

@ -59,7 +59,7 @@ private _fnc_condition = {
};
//Cool the weapon down
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "", "_barrelMass"];
private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7;
_temperature = [_temperature, _barrelMass, 20] call FUNC(calculateCooling);
[_player, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic);

View File

@ -17,6 +17,6 @@
params ["_weapon"];
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "", "_barrelMass"];
private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7;
_barrelMass

View File

@ -34,7 +34,7 @@ if (GVAR(unJamOnSwapBarrel) && {[_gunner] call FUNC(canUnjam)}) then {
[localize LSTRING(SwappedBarrel), QPATHTOF(UI\spare_barrel_ca.paa)] call EFUNC(common,displayTextPicture);
private _temp = _gunner getVariable [format [QGVAR(%1_temp), _weapon], 0];
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "", "_barrelMass"];
private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7;
// Instruct the server to load the coolest spare barrel into the weapon and
// store the removed barrel with the former weapon temperature. The server

View File

@ -20,7 +20,7 @@
params ["_unit", "_weapon", "_barrelTemperature"];
TRACE_3("params",_unit,_weapon,_barrelTemperature);
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "_closedBolt"];
private _closedBolt = ([_weapon] call FUNC(getWeaponData)) select 6;
private _canUnjam = [_unit] call FUNC(canUnjam);
private _jamType = _unit getVariable [format [QGVAR(%1_jamType), _weapon], "None"];

View File

@ -33,7 +33,7 @@ _trackedWeapons pushBackUnique _tempVarName;
_unit setVariable [QGVAR(trackedWeapons), _trackedWeapons];
// Calculate cooling
([_weapon] call FUNC(getWeaponData)) params ["", "", "", "", "", "", "", "_barrelMass"];
private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7;
_temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling);
TRACE_1("cooledTo",_temperature);