From 0addb592d3fc1c24c3b900916276c468c0bed2ca Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Mon, 21 Dec 2015 02:29:10 +0100 Subject: [PATCH 1/4] remove Unused Varaible in AB fix private in AB --- addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index 5874de96c4..fc8dc1b8a2 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -12,11 +12,7 @@ */ #include "script_component.hpp" -private "_deleted"; - -_deleted = 0; - -_aceTimeSecond = floor ACE_time; +private _aceTimeSecond = floor ACE_time; { private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"]; From c1fa81f28b237e9d42d3600913105c4316f707ab Mon Sep 17 00:00:00 2001 From: Glowbal Date: Mon, 21 Dec 2015 17:05:48 +0100 Subject: [PATCH 2/4] Fix tabs in sqf files --- addons/common/functions/fnc_fixFloating.sqf | 2 +- .../common/functions/fnc_removeBinocularMagazine.sqf | 2 +- addons/concertina_wire/functions/fnc_vehicleDamage.sqf | 6 +++--- addons/dragging/functions/fnc_dropObject.sqf | 4 ++-- .../functions/fnc_ctrlSetParsedTextCached.sqf | 4 ++-- addons/interaction/functions/fnc_joinTeam.sqf | 2 +- addons/medical/functions/fnc_actionDiagnose.sqf | 10 +++++----- addons/movement/functions/fnc_climb.sqf | 8 ++++---- addons/optics/functions/fnc_onDrawScope.sqf | 2 +- addons/safemode/functions/fnc_setSafeModeVisual.sqf | 2 +- addons/spectator/functions/fnc_handleCamera.sqf | 4 ++-- .../viewdistance/functions/fnc_setFovBasedOvdPFH.sqf | 8 ++++---- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/common/functions/fnc_fixFloating.sqf b/addons/common/functions/fnc_fixFloating.sqf index 24084d2c11..2eb6f2b4e4 100644 --- a/addons/common/functions/fnc_fixFloating.sqf +++ b/addons/common/functions/fnc_fixFloating.sqf @@ -24,7 +24,7 @@ _hitPointDamages = getAllHitPointsDamage _object; // get correct format for objects without hitpoints if (_hitPointDamages isEqualTo []) then { - _hitPointDamages = [[],[],[]]; + _hitPointDamages = [[],[],[]]; }; // this prevents physx objects from floating when near other physx objects with allowDamage false diff --git a/addons/common/functions/fnc_removeBinocularMagazine.sqf b/addons/common/functions/fnc_removeBinocularMagazine.sqf index 3d2252390a..ee35f28f1b 100644 --- a/addons/common/functions/fnc_removeBinocularMagazine.sqf +++ b/addons/common/functions/fnc_removeBinocularMagazine.sqf @@ -26,5 +26,5 @@ _selectBinocular = currentWeapon _unit == _binocular; _unit addWeapon _binocular; if (_selectBinocular) then { - _unit selectWeapon _binocular; + _unit selectWeapon _binocular; }; diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 5d04e3dc5d..dffa15b609 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -52,10 +52,10 @@ if (_mode == 0) then { ]; { _found = false; - _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log "....."; - _no = _no - [_wire]; //diag_log _no; + _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log "....."; + _no = _no - [_wire]; //diag_log _no; if (count _no > 0) exitWith { - _found = true; //diag_log "found"; + _found = true; //diag_log "found"; }; } forEach _wireCheckPosAr; // Double coil found! diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index aad30ec234..5e5687db8a 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -23,8 +23,8 @@ private "_inBuilding"; _inBuilding = [_unit] call FUNC(isObjectOnObject); if !(_unit getVariable ["ACE_isUnconscious", false]) then { - // play release animation - _unit playAction "released"; + // play release animation + _unit playAction "released"; }; // prevent collision damage diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf index 13b241e1d1..334fc13f25 100644 --- a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf +++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf @@ -6,6 +6,6 @@ params ["_ctrl", "_index", "_text"]; //systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")); if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then { - GVAR(ParsedTextCached) set [_index, _text]; - _ctrl ctrlSetStructuredText parseText _text; + GVAR(ParsedTextCached) set [_index, _text]; + _ctrl ctrlSetStructuredText parseText _text; }; diff --git a/addons/interaction/functions/fnc_joinTeam.sqf b/addons/interaction/functions/fnc_joinTeam.sqf index 1f713d8ba2..1ada3843c1 100644 --- a/addons/interaction/functions/fnc_joinTeam.sqf +++ b/addons/interaction/functions/fnc_joinTeam.sqf @@ -22,7 +22,7 @@ params ["_unit", "_team"]; // display message if (_unit == ACE_player) then { - private "_message"; + private "_message"; if (_team == "MAIN") then { _message = localize LSTRING(LeftTeam); diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index ff2bd12438..ffb2583a15 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -26,11 +26,11 @@ if (alive _target) then { _genericMessages pushBack LSTRING(diagnoseDead); }; if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then { - if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { - _genericMessages pushBack LSTRING(lostBloodALot); - } else { - _genericMessages pushBack LSTRING(lostBlood); - }; + if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then { + _genericMessages pushBack LSTRING(lostBloodALot); + } else { + _genericMessages pushBack LSTRING(lostBlood); + }; } else { _genericMessages pushBack LSTRING(noBloodloss); }; diff --git a/addons/movement/functions/fnc_climb.sqf b/addons/movement/functions/fnc_climb.sqf index a395e834b8..a0946b95d0 100644 --- a/addons/movement/functions/fnc_climb.sqf +++ b/addons/movement/functions/fnc_climb.sqf @@ -26,10 +26,10 @@ if !([_unit] call FUNC(canClimb)) exitWith { if !(_unit getVariable [QGVAR(isClimbInit), false]) then { _unit addEventHandler ["AnimChanged", { if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then { - // abort climb animation - if !(_this call FUNC(canClimb)) then { - [_this select 0, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); - }; + // abort climb animation + if !(_this call FUNC(canClimb)) then { + [_this select 0, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); + }; }; }]; diff --git a/addons/optics/functions/fnc_onDrawScope.sqf b/addons/optics/functions/fnc_onDrawScope.sqf index 26cbe235b2..d977149c95 100644 --- a/addons/optics/functions/fnc_onDrawScope.sqf +++ b/addons/optics/functions/fnc_onDrawScope.sqf @@ -10,7 +10,7 @@ _display = _this select 0; _control = _display displayCtrl 1713154; if (!ctrlShown (_display displayCtrl 154)) exitWith { - _control ctrlShow false; + _control ctrlShow false; }; private ["_sizeX", "_sizeY"]; diff --git a/addons/safemode/functions/fnc_setSafeModeVisual.sqf b/addons/safemode/functions/fnc_setSafeModeVisual.sqf index 492d5c6996..c3f46b9f4d 100644 --- a/addons/safemode/functions/fnc_setSafeModeVisual.sqf +++ b/addons/safemode/functions/fnc_setSafeModeVisual.sqf @@ -25,7 +25,7 @@ _control = (uiNamespace getVariable ["ACE_dlgSoldier", displayNull]) displayCtrl if (isNull _control) exitWith {}; if (_show) then { - private "_config"; + private "_config"; _config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture"; _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; diff --git a/addons/spectator/functions/fnc_handleCamera.sqf b/addons/spectator/functions/fnc_handleCamera.sqf index f07ac6da47..ce384c496c 100644 --- a/addons/spectator/functions/fnc_handleCamera.sqf +++ b/addons/spectator/functions/fnc_handleCamera.sqf @@ -64,8 +64,8 @@ if (GVAR(camMode) == 0) then { _vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)]; // Update the position of the target camera (used for smooth unit tracking) - _target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]); - _target camCommit 0; + _target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]); + _target camCommit 0; // Update the relative position of the unit camera _camera camSetRelPos _vector; diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf index 007c967da9..bcde34316a 100644 --- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf +++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf @@ -36,9 +36,9 @@ _zoom = (call CBA_fnc_getFov) select 1; if ((vehicle ACE_player) isKindOf "Air") exitWith { if (_zoom > VD_ZOOM_NORMAL) then { // Dynamically set Object View Distance based on player's Zoom Level and View Distance - setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); + setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); } else { - setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10); + setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10); }; TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom); }; @@ -46,8 +46,8 @@ if ((vehicle ACE_player) isKindOf "Air") exitWith { // Land if (_zoom > VD_ZOOM_NORMAL) then { // Dynamically set Object View Distance based on player's Zoom Level and View Distance - setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); + setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); } else { - setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance); + setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance); }; TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom); From e828076377c0151b7f5cfeafc9e008f7cc18c5b8 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Mon, 21 Dec 2015 17:06:04 +0100 Subject: [PATCH 3/4] Add error on tab in sqf files to sqf validator --- tools/sqf_validator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 7e7c0183d6..7414d7d715 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -109,7 +109,10 @@ def check_sqf_syntax(filepath): print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 brackets_list.append('}') - + elif (c== '\t'): + print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + if (checkForSemiColumn): if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments checkForSemiColumn = False From 2432ac3319a5c7fa4943703f57af0f49d84e5ec0 Mon Sep 17 00:00:00 2001 From: Githawk Date: Tue, 22 Dec 2015 17:54:16 +0100 Subject: [PATCH 4/4] Changed scope for carried objects --- addons/rearm/CfgVehicles.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index d7e8fafed4..30548aed76 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -170,8 +170,8 @@ class CfgVehicles { class GVAR(defaultCarriedObject) : ThingX { XEH_ENABLED; displayName = QGVAR(dummy_obj); - scope = 2; - scopeCurator = 2; + scope = 1; + scopeCurator = 1; model = "\A3\Weapons_F\AmmoBoxes\AmmoBox_F.p3d"; EGVAR(cargo,size) = 1; class ACE_Actions {