Added AGM blood volume greyness effect

This commit is contained in:
Thomas Kooi 2015-01-21 16:04:34 +01:00
parent dcd42f55e8
commit 77bd8f753d

View File

@ -51,6 +51,11 @@ FUNC(hb_effect) = {
};
GVAR(BloodLevel_CC) = ppEffectCreate ["ColorCorrections", 4208];
GVAR(BloodLevel_CC) ppEffectForceInNVG True;
GVAR(BloodLevel_CC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,1], [0.2,0.2,0.2,0]];
GVAR(BloodLevel_CC) ppEffectCommit 0;
[{
private ["_unit","_bloodLoss"];
@ -61,6 +66,16 @@ FUNC(hb_effect) = {
[_bloodLoss] call EFUNC(gui,effectBleeding);
};
// Blood Level Effect
_currentBlood = _unit getVariable [QGVAR(bloodVolume), 100];
if (_currentBlood > 99) then {
GVAR(BloodLevel_CC) ppEffectEnable False;
} else {
GVAR(BloodLevel_CC) ppEffectEnable True;
GVAR(BloodLevel_CC) ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [1, 1, 1,_currentBlood], [0.2, 0.2, 0.2, 0]];
GVAR(BloodLevel_CC) ppEffectCommit 0;
};
[{
[((_this select 0) select 0 getvariable[QGVAR(amountOfPain), 0])] call EFUNC(gui,effectPain);
[(_this select 1)] call cba_fnc_removePerFrameHandler;