From 3ef6029764cfcba7e73bf62c19addbe1732480b8 Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Fri, 31 May 2019 00:49:06 +0300 Subject: fixed CParticle crash && RandTable implemented PC codewarrior rand updated premake --- src/General.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/General.h') diff --git a/src/General.h b/src/General.h index aa52bf4d..f957ab2f 100644 --- a/src/General.h +++ b/src/General.h @@ -45,8 +45,8 @@ public: { return myrand() & 0xFFFF; } // Probably don't want to ever reach high static float GetRandomNumberInRange(float low, float high) - { return low + (high - low)*(GetRandomNumber()/65536.0f); } + { return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); } static Int32 GetRandomNumberInRange(Int32 low, Int32 high) - { return low + (high - low)*(GetRandomNumber()/65536.0f); } + { return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); } }; -- cgit v1.2.3