mirror of
https://github.com/halpz/re3.git
synced 2024-12-23 17:45:28 +00:00
fixed rand (thanks nick)
This commit is contained in:
parent
bdd5ed6a20
commit
d62c616545
|
@ -4,10 +4,6 @@ class CGeneral
|
|||
{
|
||||
public:
|
||||
static float GetATanOfXY(float x, float y){
|
||||
// why exactly doesn't this work?
|
||||
// if(y >= 0.0f) return atan2(x, y);
|
||||
// return atan2(x, y) + 2*M_PI;
|
||||
|
||||
if(x == 0.0f && y == 0.0f)
|
||||
return 0.0f;
|
||||
float xabs = fabs(x);
|
||||
|
@ -85,7 +81,7 @@ public:
|
|||
|
||||
// not too sure about all these...
|
||||
static uint16 GetRandomNumber(void)
|
||||
{ return myrand() & 0xFFFF; }
|
||||
{ return myrand() & MYRAND_MAX; }
|
||||
// Probably don't want to ever reach high
|
||||
static float GetRandomNumberInRange(float low, float high)
|
||||
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
|
||||
|
|
|
@ -5,4 +5,4 @@ class CStats
|
|||
public:
|
||||
static int32 &DaysPassed;
|
||||
static int32 &HeadShots;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -85,7 +85,7 @@ enum Config {
|
|||
#elif defined GTA_PC
|
||||
# define GTA3_1_1_PATCH
|
||||
# ifdef GTA_PS2_STUFF
|
||||
# define USE_PS2_RAND
|
||||
//# define USE_PS2_RAND // this is unsafe until we have the game reversed
|
||||
# define RANDOMSPLASH // use random splash as on PS2
|
||||
# define PS2_MATFX
|
||||
# endif
|
||||
|
|
Loading…
Reference in a new issue