This reverts commit 74342513fc.
This commit is contained in:
Major Cooke 2022-01-04 15:26:30 -06:00
parent f42ffb6c9a
commit 4c33b000e3

View file

@ -325,16 +325,6 @@ void FGameTexture::SetupSpriteData()
// //
//=========================================================================== //===========================================================================
CUSTOM_CVAR(Bool, r_trimspriteborders, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
for (int i = 0; i < TexMan.NumTextures(); i++)
{
auto tex = TexMan.GetGameTexture(FSetTextureID(i));
if (tex->GetUseType() == ETextureType::Sprite)
tex->SetupSpriteData();
}
}
void FGameTexture::SetSpriteRect() void FGameTexture::SetSpriteRect()
{ {
@ -372,7 +362,7 @@ void FGameTexture::SetSpriteRect()
spi.mSpriteRect.width = (float)spi.spriteWidth / fxScale; spi.mSpriteRect.width = (float)spi.spriteWidth / fxScale;
spi.mSpriteRect.height = (float)spi.spriteHeight / fyScale; spi.mSpriteRect.height = (float)spi.spriteHeight / fyScale;
if (spi.mTrimResult > 0 && r_trimspriteborders) if (spi.mTrimResult > 0)
{ {
spi.mSpriteRect.left += (float)spi.trim[0] / fxScale; spi.mSpriteRect.left += (float)spi.trim[0] / fxScale;
spi.mSpriteRect.top += (float)spi.trim[1] / fyScale; spi.mSpriteRect.top += (float)spi.trim[1] / fyScale;