From 328a1d26fbc5370ff2f2ed7699fc5fe7b3303bba Mon Sep 17 00:00:00 2001 From: spark512 Date: Fri, 24 Mar 2017 00:17:23 +0100 Subject: [PATCH] in regards to issue #107 (#126) * in regards to issue #107 --- regamedll/dlls/func_break.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/regamedll/dlls/func_break.cpp b/regamedll/dlls/func_break.cpp index 86fd9d1f..a87cb5ce 100644 --- a/regamedll/dlls/func_break.cpp +++ b/regamedll/dlls/func_break.cpp @@ -676,7 +676,12 @@ void CBreakable::Die() // The more negative pev->health, the louder // the sound should be. + +#ifdef REGAMEDLL_FIXES + fvol = RANDOM_FLOAT(0.85f, 1.0f) + (Q_abs(pev->health) / 100.0f); +#else fvol = RANDOM_FLOAT(0.85f, 1.0f) + (Q_abs(int(pev->health)) / 100.0f); +#endif if (fvol > 1.0f) fvol = 1.0f;