This commit is contained in:
PabstMirror 2019-03-19 16:27:49 -05:00
parent 8b4a530950
commit 6274d67edb
5 changed files with 17 additions and 16 deletions

View File

@ -13,21 +13,20 @@
};
if (GVAR(advancedCorrections)) then {
[{ // add a frame later to allow other modules to set variables
["LandVehicle", "init", {
params ["_vehicle"];
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
// config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner
private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then {
getNumber (_vehicleCfg >> QGVAR(applyCorrections))
} else {
getNumber (_vehicleCfg >> "artilleryScanner")
};
if (_applyCorrections != 1) exitWith {};
["LandVehicle", "init", {
params ["_vehicle"];
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
// config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner
private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then {
getNumber (_vehicleCfg >> QGVAR(applyCorrections))
} else {
getNumber (_vehicleCfg >> "artilleryScanner")
};
if (_applyCorrections == 1) then {
TRACE_2("adding firedEH",_vehicle,configName _vehicleCfg);
_vehicle addEventHandler ["Fired", {call FUNC(firedEH)}];
}, true, [], true] call CBA_fnc_addClassEventHandler;
}, []] call CBA_fnc_execNextFrame;
};
}, true, [], true] call CBA_fnc_addClassEventHandler;
};
}] call CBA_fnc_addEventHandler;

View File

@ -16,3 +16,5 @@ private _customVeh = configProperties [(configFile >> "CfgVehicles"), 'isClass _
_customVeh = _customVeh apply {[configName _x, getNumber (_x >> QGVAR(applyCorrections))]};
diag_log text format ["CfgVehicles with custom applyCorrections [%1]", count _customVeh];
diag_log text format ["%1", _customVeh];
diag_log text "-------------------------------------------";

View File

@ -45,7 +45,7 @@ if ((alive _player) && {_showGunLaying > 0} && {_player == gunner _vehicle}) the
private _useAltElevation = (_showGunLaying == 2)
|| {(["Mortar_01_base_F", "rhs_2b14_82mm_Base", "RHS_M252_Base", "CUP_B_M1129_MC_MK19_Desert", "LIB_GrWr34", "LIB_BM37"] findIf {_typeOf isKindOf _x}) > -1;};
// If the memory point is invalid, then the turret will always use real weapon dir (tankOrCar.cpp Line 1550 _isOpticsTargetValid will always be false) (e.g. CUP BM21)
// If the memory point is invalid, then the turret will always use real weapon dir (e.g. CUP BM21)
private _memoryPointGunnerOptics = getText (_turretCfg >> "memoryPointGunnerOptics");
private _invalidGunnerMem = (_vehicle selectionPosition [_memoryPointGunnerOptics, "Memory"]) isEqualTo [0,0,0];
if (_invalidGunnerMem) then { INFO_3("[%1-%2] turret's memoryPointGunnerOptics invalid [%3]",typeOf _vehicle,_turret,_memoryPointGunnerOptics); };

View File

@ -19,7 +19,7 @@
if (shownArtilleryComputer && {GVAR(disableArtilleryComputer)}) then {
// Still Don't like this solution, but it works
closeDialog 0;
[parseText "Computer Disabled"] call EFUNC(common,displayTextStructured);
[localize LSTRING(disableArtilleryComputer_displayName)] call EFUNC(common,displayTextStructured);
};
// Restart display if null (not just at start, this will happen periodicly)

View File

@ -40,7 +40,7 @@
<Chinese>設定由玩家射擊的迫擊砲,將會受到空氣阻力與風力的影響</Chinese>
</Key>
<Key ID="STR_ACE_artillerytables_disableArtilleryComputer_displayName">
<English>Disable Artillery Computer</English>
<English>Artillery Computer Disabled</English>
</Key>
<Key ID="STR_ACE_artillerytables_disableArtilleryComputer_description">
<English>Disable the vanilla artillery computers</English>