mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Sprite cstat 16384: invisible w/ shadows
this also adds shadows for the player when in first person git-svn-id: https://svn.eduke32.com/eduke32@1343 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2752e9d500
commit
26ca7e7fc0
2 changed files with 30 additions and 4 deletions
|
@ -1000,6 +1000,8 @@ void polymer_drawsprite(int32_t snum)
|
|||
|
||||
spriteplane.material.diffusemodulation[3] *= (1.0f - spriteext[tspr->owner].alpha);
|
||||
|
||||
if (tspr->cstat & 16384) spriteplane.material.diffusemodulation[3] = 0.0f;
|
||||
|
||||
if (((tspr->cstat>>4) & 3) == 0)
|
||||
xratio = (float)(tspr->xrepeat) * 0.20f; // 32 / 160
|
||||
else
|
||||
|
@ -3031,6 +3033,8 @@ static void polymer_drawmdsprite(spritetype *tspr)
|
|||
|
||||
color[3] *= (1.0f - spriteext[tspr->owner].alpha);
|
||||
|
||||
if (tspr->cstat & 16384) color[3] = 0.0f;
|
||||
|
||||
if (pr_gpusmoothing)
|
||||
mdspritematerial.frameprogress = m->interpol;
|
||||
|
||||
|
|
|
@ -7163,11 +7163,33 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
if (s->owner >= 0 && display_mirror == 0 && g_player[p].ps->over_shoulder_on == 0)
|
||||
if (ud.multimode < 2 || (ud.multimode > 1 && p == screenpeek))
|
||||
{
|
||||
t->owner = -1;
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
continue;
|
||||
// t->owner = -1;
|
||||
// t->xrepeat = t->yrepeat = 0;
|
||||
t->cstat |= 16384;
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
|
||||
{
|
||||
k = 0;
|
||||
t->cstat &= ~4;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
k = (((s->ang+3072+128-a)&2047)>>8)&7;
|
||||
if (k>4)
|
||||
{
|
||||
k = 8-k;
|
||||
t->cstat |= 4;
|
||||
}
|
||||
else t->cstat &= ~4;
|
||||
}
|
||||
|
||||
if (sector[t->sectnum].lotag == 2) k += 1795-1405;
|
||||
else if ((ActorExtra[i].floorz-s->z) > (64<<8)) k += 60;
|
||||
|
||||
t->picnum += k;
|
||||
t->pal = g_player[p].ps->palookup;
|
||||
}
|
||||
PALONLY:
|
||||
|
||||
if (sector[sect].floorpal && sector[sect].floorpal < g_numRealPalettes && !A_CheckSpriteFlags(t->owner,SPRITE_NOPAL))
|
||||
|
|
Loading…
Reference in a new issue