move sprite mobj checks first
This commit is contained in:
1 parent
bfddbcde6d
commit
a4f52ebd10
1 file changed
+7
-7
@@ -4198,12 +4198,6 @@ static void HWR_DrawSprite(gr_vissprite_t *spr)
|
||||
FSurfaceInfo Surf;
|
||||
|
||||
INT32 shader = SHADER_NONE;
|
||||
|
||||
const boolean hires = (spr->mobj && spr->mobj->skin && ((skin_t *)( (spr->mobj->localskin) ? spr->mobj->localskin : spr->mobj->skin ))->flags & SF_HIRES);
|
||||
if (spr->mobj)
|
||||
this_scale = FIXED_TO_FLOAT(spr->mobj->scale);
|
||||
if (hires)
|
||||
this_scale = this_scale * FIXED_TO_FLOAT(((skin_t *)( (spr->mobj->localskin) ? spr->mobj->localskin : spr->mobj->skin ))->highresscale);
|
||||
|
||||
if (!spr->mobj)
|
||||
return;
|
||||
@@ -4217,6 +4211,12 @@ static void HWR_DrawSprite(gr_vissprite_t *spr)
|
||||
return;
|
||||
}
|
||||
|
||||
const boolean hires = (spr->mobj && spr->mobj->skin && ((skin_t *)( (spr->mobj->localskin) ? spr->mobj->localskin : spr->mobj->skin ))->flags & SF_HIRES);
|
||||
if (spr->mobj)
|
||||
this_scale = FIXED_TO_FLOAT(spr->mobj->scale);
|
||||
if (hires)
|
||||
this_scale = this_scale * FIXED_TO_FLOAT(((skin_t *)( (spr->mobj->localskin) ? spr->mobj->localskin : spr->mobj->skin ))->highresscale);
|
||||
|
||||
// cache sprite graphics
|
||||
//12/12/99: Hurdler:
|
||||
// OK, I don't change anything for MD2 support because I want to be
|
||||
@@ -4342,7 +4342,7 @@ static void HWR_DrawSprite(gr_vissprite_t *spr)
|
||||
shader = SHADER_SPRITE; // sprite shader
|
||||
blend |= PF_ColorMapped;
|
||||
}
|
||||
|
||||
|
||||
HWR_ProcessPolygon(&Surf, wallVerts, 4, blend|PF_Modulated, shader, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user