mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix frame blend flags not working with 3D models
This commit is contained in:
parent
b1c0dd43cd
commit
3581d06012
1 changed files with 8 additions and 2 deletions
|
@ -1346,12 +1346,18 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
//if (tics > durs)
|
||||
//durs = tics;
|
||||
|
||||
INT32 blendmode;
|
||||
if (spr->mobj->frame & FF_BLENDMASK)
|
||||
blendmode = ((spr->mobj->frame & FF_BLENDMASK) >> FF_BLENDSHIFT) + 1;
|
||||
else
|
||||
blendmode = spr->mobj->blendmode;
|
||||
|
||||
if (spr->mobj->frame & FF_TRANSMASK)
|
||||
Surf.PolyFlags = HWR_SurfaceBlend(spr->mobj->blendmode, (spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf);
|
||||
Surf.PolyFlags = HWR_SurfaceBlend(blendmode, (spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf);
|
||||
else
|
||||
{
|
||||
Surf.PolyColor.s.alpha = (spr->mobj->flags2 & MF2_SHADOW) ? 0x40 : 0xff;
|
||||
Surf.PolyFlags = HWR_GetBlendModeFlag(spr->mobj->blendmode);
|
||||
Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode);
|
||||
}
|
||||
|
||||
// don't forget to enable the depth test because we can't do this
|
||||
|
|
Loading…
Reference in a new issue