|
|
|
@ -151,6 +151,30 @@ int GAME_EXPORT COM_RandomLong( int lLow, int lHigh )
@@ -151,6 +151,30 @@ int GAME_EXPORT COM_RandomLong( int lLow, int lHigh )
|
|
|
|
|
return lLow + (n % x); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
============ |
|
|
|
|
va |
|
|
|
|
|
|
|
|
|
does a varargs printf into a temp buffer, |
|
|
|
|
so I don't need to have varargs versions |
|
|
|
|
of all text functions. |
|
|
|
|
============ |
|
|
|
|
*/ |
|
|
|
|
char *va( const char *format, ... ) |
|
|
|
|
{ |
|
|
|
|
va_list argptr; |
|
|
|
|
static char string[16][MAX_VA_STRING], *s; |
|
|
|
|
static int stringindex = 0; |
|
|
|
|
|
|
|
|
|
s = string[stringindex]; |
|
|
|
|
stringindex = (stringindex + 1) & 15; |
|
|
|
|
va_start( argptr, format ); |
|
|
|
|
Q_vsnprintf( s, sizeof( string[0] ), format, argptr ); |
|
|
|
|
va_end( argptr ); |
|
|
|
|
|
|
|
|
|
return s; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
=============================================================================== |
|
|
|
|
|
|
|
|
|