Fix wave random at high level-times

This commit is contained in:
Zack Middleton 2017-09-17 23:18:57 -05:00
parent 4837f4619e
commit 953fc72a2f
2 changed files with 2 additions and 2 deletions

View file

@ -123,7 +123,7 @@ extern cvar_t *r_saveFontData;
qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode );
float R_NoiseGet4f( float x, float y, float z, double t );
int R_RandomOn( float t );
int R_RandomOn( double t );
void R_NoiseInit( void );
image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags );

View file

@ -94,7 +94,7 @@ float R_NoiseGet4f( float x, float y, float z, double t )
// used in the shader functions (GF_RANDOM) to implement a quasi random flickering.
#define VALR( a ) s_random[ ( a ) & ( NOISE_MASK )]
int R_RandomOn(float t)
int R_RandomOn(double t)
{
return VALR((unsigned int) floor(t));
}