Fixed div by zero

This commit is contained in:
BaerMitUmlaut 2017-01-29 21:20:55 +01:00
parent 7ff753c3c2
commit 9d3807e7c2

View File

@ -11,9 +11,8 @@
#include "script_component.hpp"
private _heartRate = ACE_player getVariable [QEGVAR(medical,heartRate), DEFAULT_HEART_RATE];
private _waitTime = 60 / _heartRate;
if (_heartRate == 0) exitWith {};
private _waitTime = 60 / _heartRate;
if (CBA_missionTime - GVAR(lastHeartBeatSound) > _waitTime) then {
GVAR(lastHeartBeatSound) = CBA_missionTime;