Merge pull request #4358 from acemod/tweakFatigueDuty

Tweak fatgiue duty factors
This commit is contained in:
BaerMitUmlaut 2016-09-18 16:31:21 +02:00 committed by GitHub
commit a8b490bfca

View File

@ -18,22 +18,24 @@ if (!hasInterface) exitWith {};
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
// - Duty factors -------------------------------------------------------------
[QEGVAR(medical,pain), {
1 + (((_this getVariable [QEGVAR(medical,pain), 0]) min 1) / 10)
}] call FUNC(addDutyFactor);
[QEGVAR(medical,bloodVolume), {
2 - (((_this getVariable [QEGVAR(medical,bloodVolume), 100]) min 100) / 100)
}] call FUNC(addDutyFactor);
[QEGVAR(dragging,isCarrying), {
if (_this getVariable [QEGVAR(dragging,isCarrying), false]) then {
3
} else {
1
};
}] call FUNC(addDutyFactor);
[QEGVAR(weather,temperature), {
(((missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]) - 35) / 10) max 2 min 1
}] call FUNC(addDutyFactor);
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
}] call FUNC(addDutyFactor);
[QEGVAR(medical,bloodVolume), { // 100->1.0, 90->1.1, 80->1.2
linearConversion [100, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 100]), 1, 2, true];
}] call FUNC(addDutyFactor);
};
if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(dragging,isCarrying), {
[1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]);
}] call FUNC(addDutyFactor);
};
if (["ACE_Weather"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(weather,temperature), { // 35->1, 45->2
linearConversion [35, 45, (missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]), 1, 2, true];
}] call FUNC(addDutyFactor);
};
// - Add main PFH -------------------------------------------------------------
[FUNC(pfhMain), 1, []] call CBA_fnc_addPerFrameHandler;