Skip to content

Commit

Permalink
Fix AF sway factor (#6360)
Browse files Browse the repository at this point in the history
* Fix sway factor, switch to CBA settings in AF

* Add movedToSQF
  • Loading branch information
BaerMitUmlaut authored and PabstMirror committed May 30, 2018
1 parent 232f986 commit 9aba78b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 55 deletions.
41 changes: 6 additions & 35 deletions addons/advanced_fatigue/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,49 +1,20 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(Enabled);
description = CSTRING(Enabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(enableStaminaBar) {
category = CSTRING(DisplayName);
displayName = CSTRING(EnableStaminaBar);
description = CSTRING(EnableStaminaBar_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(performanceFactor) {
category = CSTRING(DisplayName);
displayName = CSTRING(PerformanceFactor);
description = CSTRING(PerformanceFactor_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 5, 1, 1};
movedToSQF = 1;
};
class GVAR(recoveryFactor) {
category = CSTRING(DisplayName);
displayName = CSTRING(RecoveryFactor);
description = CSTRING(RecoveryFactor_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 5, 1, 1};
movedToSQF = 1;
};
class GVAR(loadFactor) {
category = CSTRING(DisplayName);
displayName = CSTRING(LoadFactor);
description = CSTRING(LoadFactor_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 5, 1, 1};
movedToSQF = 1;
};
class GVAR(terrainGradientFactor) {
category = CSTRING(DisplayName);
displayName = CSTRING(TerrainGradientFactor);
description = CSTRING(TerrainGradientFactor_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 5, 1, 1};
movedToSQF = 1;
};
};
3 changes: 2 additions & 1 deletion addons/advanced_fatigue/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
//#include "initSettings.sqf"

#include "initSettings.sqf"

GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(dutyList) = [[], []];
Expand Down
24 changes: 12 additions & 12 deletions addons/advanced_fatigue/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
QGVAR(enabled),
"CHECKBOX",
[LSTRING(Enabled), LSTRING(Enabled_Description)],
"ACE3 Advanced Fatigue",
LSTRING(DisplayName),
true,
true
] call CBA_Settings_fnc_init;
Expand All @@ -11,7 +11,7 @@
QGVAR(enableStaminaBar),
"CHECKBOX",
[LSTRING(EnableStaminaBar), LSTRING(EnableStaminaBar_Description)],
"ACE3 Advanced Fatigue",
LSTRING(DisplayName),
true,
true, {
if (!_this) then {
Expand All @@ -26,43 +26,43 @@
QGVAR(performanceFactor),
"SLIDER",
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;

[
QGVAR(recoveryFactor),
"SLIDER",
[LSTRING(RecoveryFactor), LSTRING(RecoveryFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;

[
QGVAR(loadFactor),
"SLIDER",
[LSTRING(LoadFactor), LSTRING(LoadFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;

[
QGVAR(terrainGradientFactor),
"SLIDER",
[LSTRING(TerrainGradientFactor), LSTRING(TerrainGradientFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;

[
QGVAR(swayFactor),
"SLIDER",
[LSTRING(SwayFactor), LSTRING(SwayFactor_Description)],
"ACE3 Advanced Fatigue",
[0, 2, 1, 1],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
14 changes: 7 additions & 7 deletions addons/advanced_fatigue/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<Project name="ACE">
<Package name="Advanced_Fatigue">
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
<English>Advanced Fatigue</English>
<German>Erweiterte Ausdauer</German>
<Chinese>進階疲勞</Chinese>
<Chinesesimp>进阶疲劳</Chinesesimp>
<Japanese>アドバンスド疲労</Japanese>
<Italian>Fatica Avanzata</Italian>
<Korean>고급 피로도</Korean>
<English>ACE Advanced Fatigue</English>
<German>ACE Erweiterte Ausdauer</German>
<Chinese>ACE 進階疲勞</Chinese>
<Chinesesimp>ACE 进阶疲劳</Chinesesimp>
<Japanese>ACE アドバンスド疲労</Japanese>
<Italian>ACE Fatica Avanzata</Italian>
<Korean>ACE 고급 피로도</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
<English>Performance Factor</English>
Expand Down

0 comments on commit 9aba78b

Please sign in to comment.