Add swayFactor option to advanced fatigue

This commit is contained in:
John Lillis 2017-11-15 12:16:15 -05:00
parent 9b6f1879f6
commit 36b7ac0623
6 changed files with 32 additions and 3 deletions

View File

@ -42,4 +42,11 @@ class ACE_Settings {
typeName = "SCALAR";
value = 1;
};
class GVAR(swayFactor) {
category = CSTRING(DisplayName);
displayName = CSTRING(SwayFactor);
description = CSTRING(SwayFactor_Description);
typeName = "SCALAR";
value = 1;
};
};

View File

@ -40,6 +40,12 @@ class CfgVehicles {
typeName = "NUMBER";
defaultValue = 1;
};
class SwayFactor {
displayName = CSTRING(SwayFactor);
description = CSTRING(SwayFactor_Description);
typeName = "NUMBER";
defaultValue = 1;
};
};
};
};

View File

@ -90,12 +90,12 @@ if (_overexhausted) then {
switch (stance _unit) do {
case ("CROUCH"): {
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 0.1);
_unit setCustomAimCoef ((1.0 + _fatigue ^ 2 * 0.1) * GVAR(swayFactor));
};
case ("PRONE"): {
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 2.0);
_unit setCustomAimCoef ((1.0 + _fatigue ^ 2 * 2.0) * GVAR(swayFactor));
};
default {
_unit setCustomAimCoef (1.5 + _fatigue ^ 2 * 3.0);
_unit setCustomAimCoef ((1.5 + _fatigue ^ 2 * 3.0) * GVAR(swayFactor));
};
};

View File

@ -21,3 +21,4 @@ params ["_logic"];
[_logic, QGVAR(recoveryFactor), "RecoveryFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(loadFactor), "LoadFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(terrainGradientFactor), "TerrainGradientFactor"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(swayFactor), "SwayFactor"] call EFUNC(common,readSettingFromModule);

View File

@ -57,3 +57,12 @@
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(swayFactor),
"SLIDER",
[LSTRING(SwayFactor), LSTRING(SwayFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
true
] call CBA_Settings_fnc_init;

View File

@ -109,6 +109,12 @@
<Chinese>設定陡峭的地形將會影響多少體力的流失,值越高代表體力流失越快</Chinese>
<Chinesesimp>设定陡峭的地形将会影响多少体力的流,失值越高代表体力流失越快</Chinesesimp>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor">
<English>Sway factor</English>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
<English>Changes how much fatigue influences weapon sway. Higher means more weapon sway.</English>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
<German>Aktiv</German>