summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorWalied K. Yassen <walied.developer@hotmail.com>2020-11-29 08:14:15 +0100
committerWalied K. Yassen <walied.developer@hotmail.com>2020-11-29 08:14:15 +0100
commita1ab82b1887a9d2bf8d64b2223c0f135e1403a1d (patch)
tree4a42998cfc93316acdcf273e60c3d30b465394e7 /src/core
parentFix MI_RCBOMB gravity force and treat MI_PETROLPUMP2 as explosive (diff)
downloadre3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar.gz
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar.bz2
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar.lz
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar.xz
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.tar.zst
re3-a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/General.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/General.h b/src/core/General.h
index 7e06b96e..52850794 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -159,6 +159,11 @@ public:
static int32 GetRandomNumberInRange(int32 low, int32 high)
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
+
+ // Returns inclusive value in the specified range
+ static int32 GetRandomNumberInRangeInc(int32 low, int32 high)
+ { return GetRandomNumberInRange(low - 1, high + 1); }
+
static void SetRandomSeed(int32 seed)
{ mysrand(seed); }
};