- code simplification.

This commit is contained in:
Christoph Oelckers 2018-12-14 22:34:28 +01:00 committed by drfrag
parent 4cdfd7ff33
commit c47549c009

View file

@ -1023,19 +1023,9 @@ CCMD (printspans)
float FTexCoordInfo::RowOffset(float rowoffset) const
{
float tscale = fabs(mTempScale.Y);
float scale = fabs(mScale.Y);
if (tscale == 1.f)
{
if (scale == 1.f || mWorldPanning) return rowoffset;
else return rowoffset / scale;
}
else
{
if (mWorldPanning) return rowoffset;
else return rowoffset / scale;
}
if (scale == 1.f || mWorldPanning) return rowoffset;
else return rowoffset / scale;
}
//===========================================================================
@ -1046,18 +1036,9 @@ float FTexCoordInfo::RowOffset(float rowoffset) const
float FTexCoordInfo::TextureOffset(float textureoffset) const
{
float tscale = fabs(mTempScale.X);
float scale = fabs(mScale.X);
if (tscale == 1.f)
{
if (scale == 1.f || mWorldPanning) return textureoffset;
else return textureoffset / scale;
}
else
{
if (mWorldPanning) return textureoffset;
else return textureoffset / scale;
}
if (scale == 1.f || mWorldPanning) return textureoffset;
else return textureoffset / scale;
}
//===========================================================================