diff --git a/codemp/RMG/RM_Terrain.cpp b/codemp/RMG/RM_Terrain.cpp index 1d18628..fe532b9 100644 --- a/codemp/RMG/RM_Terrain.cpp +++ b/codemp/RMG/RM_Terrain.cpp @@ -345,7 +345,7 @@ void CRMLandScape::Sprinkle(CCMPatch *patch, CCGHeightDetails *hd, int level) // Get a number -5.3f to 5.3f density = (mDensityMap[px + (common->GetBlockWidth() * py)] - 128) / 24.0f; // ..and multiply that into the count - count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * powf(2.0f, density) * 0.001); + count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * Q_powf(2.0f, density) * 0.001); for(i = 0; i < count; i++) { diff --git a/codemp/cgame/cg_view.c b/codemp/cgame/cg_view.c index b9e7633..342a096 100644 --- a/codemp/cgame/cg_view.c +++ b/codemp/cgame/cg_view.c @@ -441,7 +441,7 @@ static void CG_UpdateThirdPersonTargetDamp(void) // Note that since there are a finite number of "practical" delta millisecond values possible, // the ratio should be initialized into a chart ultimately. - ratio = powf(dampfactor, dtime); + ratio = Q_powf(dampfactor, dtime); // This value is how much distance is "left" from the ideal. VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget); @@ -528,7 +528,7 @@ static void CG_UpdateThirdPersonCameraDamp(void) // Note that since there are a finite number of "practical" delta millisecond values possible, // the ratio should be initialized into a chart ultimately. - ratio = powf(dampfactor, dtime); + ratio = Q_powf(dampfactor, dtime); // This value is how much distance is "left" from the ideal. VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc); diff --git a/codemp/game/q_math.c b/codemp/game/q_math.c index 63e766c..d67f5bf 100644 --- a/codemp/game/q_math.c +++ b/codemp/game/q_math.c @@ -1470,7 +1470,7 @@ int Q_irand(int value1, int value2) return irand(value1, value2); } -float powf ( float x, int y ) +float Q_powf ( float x, int y ) { float r = x; for ( y--; y>0; y-- ) diff --git a/codemp/game/q_shared.h b/codemp/game/q_shared.h index 73f50b8..40f004a 100644 --- a/codemp/game/q_shared.h +++ b/codemp/game/q_shared.h @@ -1280,7 +1280,7 @@ float Q_rsqrt( float f ); // reciprocal square root signed char ClampChar( int i ); signed short ClampShort( int i ); -float powf ( float x, int y ); +float Q_powf ( float x, int y ); // this isn't a real cheap function to call! int DirToByte( vec3_t dir ); diff --git a/codemp/renderer/tr_terrain.cpp b/codemp/renderer/tr_terrain.cpp index f3c416a..4509b99 100644 --- a/codemp/renderer/tr_terrain.cpp +++ b/codemp/renderer/tr_terrain.cpp @@ -445,7 +445,7 @@ void CTRLandScape::CalculateLighting(void) // Both normalised, so -1.0 < dp < 1.0 dp = Com_Clampi(0.0f, 1.0f, DotProduct(direction, total)); - dp = powf(dp, 3); + dp = Q_powf(dp, 3); VectorScale(ambient, (1.0 - dp) * 0.5, ambient); VectorMA(ambient, dp, directed, tint);