Fixes low energy issue #945 + new low battery sounds (below 5)

This commit is contained in:
Raymix 2017-10-24 19:29:56 +01:00
parent c198fd69e0
commit 8986729467

View File

@ -5,8 +5,14 @@ _led = uiNamespace getVariable ["EPOCH_geiger_LED",controlNull];
if (_rads >= 10) then { if (_rads >= 10) then {
if (!EPOCH_geiger_mute_warning) then { if (!EPOCH_geiger_mute_warning) then {
if (EPOCH_playerEnergy > 0) then {
if (EPOCH_playerEnergy < 5) then {
playSound "geiger_epoch_alarm_low";
} else {
playSound "geiger_epoch_alarm"; playSound "geiger_epoch_alarm";
}; };
};
};
[] spawn { [] spawn {
disableSerialization; disableSerialization;
_lcd = uiNamespace getVariable ["EPOCH_geiger_LCD",controlNull]; _lcd = uiNamespace getVariable ["EPOCH_geiger_LCD",controlNull];
@ -24,8 +30,14 @@ if (_rads >= 10) then {
for "_i" from 1 to (ceil _rads) do { for "_i" from 1 to (ceil _rads) do {
if (!EPOCH_geiger_mute_counter) then { if (!EPOCH_geiger_mute_counter) then {
if (EPOCH_playerEnergy > 0) then {
if (EPOCH_playerEnergy < 5) then {
playSound "geiger_epoch_tick_low";
} else {
playSound "geiger_epoch_tick"; playSound "geiger_epoch_tick";
//playSound "geiger_epoch_tick"; //makes geiger louder, remove if affects performance };
};
}; };
_led ctrlSetText "x\addons\a3_epoch_assets_1\pictures\geiger\geiger_4on"; _led ctrlSetText "x\addons\a3_epoch_assets_1\pictures\geiger\geiger_4on";
uiSleep (random 0.5); uiSleep (random 0.5);