diff options
author | Walied K. Yassen <walied.developer@hotmail.com> | 2020-11-29 08:14:15 +0100 |
---|---|---|
committer | Walied K. Yassen <walied.developer@hotmail.com> | 2020-11-29 08:14:15 +0100 |
commit | a1ab82b1887a9d2bf8d64b2223c0f135e1403a1d (patch) | |
tree | 4a42998cfc93316acdcf273e60c3d30b465394e7 /src/core/General.h | |
parent | Fix MI_RCBOMB gravity force and treat MI_PETROLPUMP2 as explosive (diff) | |
download | re3-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 '')
-rw-r--r-- | src/core/General.h | 5 |
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); } }; |