diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 808cbff95..fac9bd5bb 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -731,7 +731,7 @@ void gl_RenderModel(GLSprite * spr, int cm) { if((x * cos(angle * M_PI / 180) + y * sin(angle * M_PI / 180)) / sqrt(x * x + y * y) < 0) pitch *= -1; } - else pitch = abs(pitch); + else pitch = fabs(pitch); } if( smf->flags & MDL_ROTATING ) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 63efb978e..0ba386b1a 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -663,9 +663,9 @@ void GLSprite::Process(AActor* thing,sector_t * sector) if (smarterclip) { // Reduce slightly clipping adjustment of corpses - if (thing->flags & MF_CORPSE || spriteheight > abs(diffb)) + if (thing->flags & MF_CORPSE || spriteheight > fabs(diffb)) { - float ratio = clamp((abs(diffb) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0); + float ratio = clamp((fabs(diffb) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0); diffb*=ratio; } if (!diffb) @@ -679,9 +679,9 @@ void GLSprite::Process(AActor* thing,sector_t * sector) difft=0; } } - if (spriteheight > abs(difft)) + if (spriteheight > fabs(difft)) { - float ratio = clamp((abs(difft) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0); + float ratio = clamp((fabs(difft) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0); difft*=ratio; } z2-=difft;