mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 23:42:11 +00:00
Merge branch 'ogl-model-blend-flags-fix' into 'next'
Fix frame blend flags not working with 3D models See merge request STJr/SRB2!1778
This commit is contained in:
commit
d9799540c6
1 changed files with 8 additions and 2 deletions
|
@ -1346,12 +1346,18 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
||||||
//if (tics > durs)
|
//if (tics > durs)
|
||||||
//durs = tics;
|
//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)
|
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
|
else
|
||||||
{
|
{
|
||||||
Surf.PolyColor.s.alpha = (spr->mobj->flags2 & MF2_SHADOW) ? 0x40 : 0xff;
|
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
|
// don't forget to enable the depth test because we can't do this
|
||||||
|
|
Loading…
Reference in a new issue