mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
- Fix voxels not being rendered when the replaced sprite texture doesn't exist
This commit is contained in:
parent
9e2d44e9c8
commit
c30010370e
1 changed files with 10 additions and 5 deletions
|
@ -1008,17 +1008,22 @@ namespace swrenderer
|
||||||
bool flipX;
|
bool flipX;
|
||||||
|
|
||||||
FTextureID tex = sprdef->GetSpriteFrame(thing->frame, -1, sprangle, &flipX, !!(thing->flags7 & MF7_SPRITEFLIP));
|
FTextureID tex = sprdef->GetSpriteFrame(thing->frame, -1, sprangle, &flipX, !!(thing->flags7 & MF7_SPRITEFLIP));
|
||||||
if (!tex.isValid()) return false;
|
if (tex.isValid())
|
||||||
|
|
||||||
if (flipX)
|
|
||||||
{
|
{
|
||||||
sprite.renderflags ^= RF_XFLIP;
|
if (flipX)
|
||||||
|
{
|
||||||
|
sprite.renderflags ^= RF_XFLIP;
|
||||||
|
}
|
||||||
|
sprite.tex = TexMan[tex]; // Do not animate the rotation
|
||||||
}
|
}
|
||||||
sprite.tex = TexMan[tex]; // Do not animate the rotation
|
|
||||||
if (r_drawvoxels)
|
if (r_drawvoxels)
|
||||||
{
|
{
|
||||||
sprite.voxel = SpriteFrames[sprdef->spriteframes + thing->frame].Voxel;
|
sprite.voxel = SpriteFrames[sprdef->spriteframes + thing->frame].Voxel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sprite.voxel == nullptr && !tex.isValid())
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sprite.voxel == nullptr && (sprite.tex == nullptr || sprite.tex->UseType == FTexture::TEX_Null))
|
if (sprite.voxel == nullptr && (sprite.tex == nullptr || sprite.tex->UseType == FTexture::TEX_Null))
|
||||||
|
|
Loading…
Reference in a new issue