MATERIALFLAG_ALPHA, to prevent bugs where code checks those flags
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11365
d7cf8633-e32d-0410-b094-
e92efae38249
t->currentmaterialflags |= MATERIALFLAG_ADD | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW;
else if (t->currentalpha < 1)
t->currentmaterialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW;
+ // LordHavoc: prevent bugs where code checks add or alpha at higher priority than customblend by clearing these flags
+ if (t->currentmaterialflags & MATERIALFLAG_CUSTOMBLEND)
+ t->currentmaterialflags &= ~(MATERIALFLAG_ADD | MATERIALFLAG_ALPHA);
if (rsurface.ent_flags & RENDER_DOUBLESIDED)
t->currentmaterialflags |= MATERIALFLAG_NOSHADOW | MATERIALFLAG_NOCULLFACE;
if (rsurface.ent_flags & (RENDER_NODEPTHTEST | RENDER_VIEWMODEL))