add some casts so gcc can pick an overloaded abs/max/min func

This commit is contained in:
Jonathan Gray 2013-04-25 14:16:27 +10:00
parent 1625e229c9
commit 3b0e200e4f
3 changed files with 4 additions and 4 deletions

View File

@ -904,7 +904,7 @@ void CFxScheduler::PlayEffect( int id, vec3_t origin, vec3_t axis[3], const int
if ( prim->mSpawnFlags & FX_EVEN_DISTRIBUTION )
{
factor = abs(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin()) / (float)count;
factor = abs((long)(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin())) / (float)count;
}
// Schedule the random number of bits

View File

@ -1194,7 +1194,7 @@ e_status CIN_RunCinematic (int handle)
}
thisTime = Sys_Milliseconds()*com_timescale->value;
if (cinTable[currentHandle].shader && (abs(thisTime - cinTable[currentHandle].lastTime))>100) {
if (cinTable[currentHandle].shader && (abs((long)(thisTime - cinTable[currentHandle].lastTime)))>100) {
cinTable[currentHandle].startTime += thisTime - cinTable[currentHandle].lastTime;
}
cinTable[currentHandle].tfps = ((((Sys_Milliseconds()*com_timescale->value) - cinTable[currentHandle].startTime)*cinTable[currentHandle].roqFPS)/1000);

View File

@ -1471,10 +1471,10 @@ usercmd_t CL_CreateCmd( void ) {
// draw debug graphs of turning for mouse testing
if ( cl_debugMove->integer ) {
if ( cl_debugMove->integer == 1 ) {
SCR_DebugGraph( abs(cl.viewangles[YAW] - oldAngles[YAW]), 0 );
SCR_DebugGraph( abs((long)(cl.viewangles[YAW] - oldAngles[YAW])), 0 );
}
if ( cl_debugMove->integer == 2 ) {
SCR_DebugGraph( abs(cl.viewangles[PITCH] - oldAngles[PITCH]), 0 );
SCR_DebugGraph( abs((long)(cl.viewangles[PITCH] - oldAngles[PITCH])), 0 );
}
}