mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
Fix TC_DASHMODE and associated not being applied in GL. (Won't conflict with md3 branch because these lines weren't modified there!)
This commit is contained in:
parent
126fc44d6e
commit
ef886e4b80
2 changed files with 21 additions and 7 deletions
|
@ -5755,6 +5755,15 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
// New colormap stuff for skins Tails 06-07-2002
|
||||
if (thing->colorized)
|
||||
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
|
||||
else if (thing->player && thing->player->dashmode >= DASHMODE_THRESHOLD
|
||||
&& (thing->player->charflags & SF_DASHMODE)
|
||||
&& ((leveltime/2) & 1))
|
||||
{
|
||||
if (thing->player->charflags & SF_MACHINE)
|
||||
vis->colormap = R_GetTranslationColormap(TC_DASHMODE, 0, GTC_CACHE);
|
||||
else
|
||||
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
|
||||
}
|
||||
else if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
|
||||
{
|
||||
size_t skinnum = (skin_t*)thing->skin-skins;
|
||||
|
|
|
@ -1397,16 +1397,21 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
}
|
||||
else if (spr->mobj->color)
|
||||
{
|
||||
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
||||
if (spr->mobj->colorized)
|
||||
skinnum = TC_RAINBOW;
|
||||
else if (spr->mobj->player && spr->mobj->player->dashmode >= DASHMODE_THRESHOLD
|
||||
&& (spr->mobj->player->charflags & SF_DASHMODE)
|
||||
&& ((leveltime/2) & 1))
|
||||
{
|
||||
if (spr->mobj->colorized)
|
||||
skinnum = TC_RAINBOW;
|
||||
if (spr->mobj->player->charflags & SF_MACHINE)
|
||||
skinnum = TC_DASHMODE;
|
||||
else
|
||||
{
|
||||
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);
|
||||
}
|
||||
skinnum = TC_RAINBOW;
|
||||
}
|
||||
else skinnum = TC_DEFAULT;
|
||||
else if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
||||
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);
|
||||
else
|
||||
skinnum = TC_DEFAULT;
|
||||
}
|
||||
HWR_GetBlendedTexture(gpatch, (GLPatch_t *)md2->blendgrpatch, skinnum, spr->colormap, (skincolors_t)spr->mobj->color);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue