diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 39663ab53..babab5050 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -793,7 +793,7 @@ void gl_RenderModel(GLSprite * spr) { 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 9ce6856b0..970c0dd58 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -583,9 +583,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) @@ -599,9 +599,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;