fixed rand (thanks nick)
This commit is contained in:
parent
bdd5ed6a20
commit
d62c616545
@ -4,10 +4,6 @@ class CGeneral
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static float GetATanOfXY(float x, float y){
|
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)
|
if(x == 0.0f && y == 0.0f)
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
float xabs = fabs(x);
|
float xabs = fabs(x);
|
||||||
@ -85,7 +81,7 @@ public:
|
|||||||
|
|
||||||
// not too sure about all these...
|
// not too sure about all these...
|
||||||
static uint16 GetRandomNumber(void)
|
static uint16 GetRandomNumber(void)
|
||||||
{ return myrand() & 0xFFFF; }
|
{ return myrand() & MYRAND_MAX; }
|
||||||
// Probably don't want to ever reach high
|
// Probably don't want to ever reach high
|
||||||
static float GetRandomNumberInRange(float low, float high)
|
static float GetRandomNumberInRange(float low, float high)
|
||||||
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
|
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
|
||||||
|
@ -85,7 +85,7 @@ enum Config {
|
|||||||
#elif defined GTA_PC
|
#elif defined GTA_PC
|
||||||
# define GTA3_1_1_PATCH
|
# define GTA3_1_1_PATCH
|
||||||
# ifdef GTA_PS2_STUFF
|
# 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 RANDOMSPLASH // use random splash as on PS2
|
||||||
# define PS2_MATFX
|
# define PS2_MATFX
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user