mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +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;
|
||||
|
||||
FTextureID tex = sprdef->GetSpriteFrame(thing->frame, -1, sprangle, &flipX, !!(thing->flags7 & MF7_SPRITEFLIP));
|
||||
if (!tex.isValid()) return false;
|
||||
|
||||
if (flipX)
|
||||
if (tex.isValid())
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
|
|
Loading…
Reference in a new issue