mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 23:41:56 +00:00
- fixed several incorrect uses of abs instead of fabs.
This commit is contained in:
parent
925305aa05
commit
ece10bb57f
2 changed files with 5 additions and 5 deletions
|
@ -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 )
|
||||
|
|
|
@ -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<float>((abs(diffb) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0);
|
||||
float ratio = clamp<float>((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<float>((abs(difft) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0);
|
||||
float ratio = clamp<float>((fabs(difft) * (float)gl_sclipfactor/(spriteheight+1)), 0.5, 1.0);
|
||||
difft*=ratio;
|
||||
}
|
||||
z2-=difft;
|
||||
|
|
Loading…
Reference in a new issue