Improve the behavior of the BLOODSPLAT family of sprites. This improves the effect so that the blood doesn't stutter when it moves, and no longer occasionally appears to climb back up the wall for a fraction of a second.

git-svn-id: https://svn.eduke32.com/eduke32@5397 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-10-21 19:54:02 +00:00
parent 6bf2a897c6
commit 87c8e86d44
2 changed files with 10 additions and 4 deletions

View file

@ -4984,10 +4984,16 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5
case BLOODSPLAT3__STATIC: case BLOODSPLAT3__STATIC:
case BLOODSPLAT4__STATIC: case BLOODSPLAT4__STATIC:
if (t[0] == 7*GAMETICSPERSEC) goto BOLT; if (t[0] == 3*GAMETICSPERSEC) goto BOLT;
s->z += 16+(krand()&15); actor[i].bpos.z -= s->z;
t[0]++; t[0]++;
if ((t[0]%9) == 0) s->yrepeat++; if ((t[0]%9) == 0)
{
s->yrepeat++;
s->z += (tilesiz[s->picnum].y*s->yrepeat)>>2;
}
else s->z += 16 + (krand() & 15);
actor[i].bpos.z += s->z;
goto BOLT; goto BOLT;
case NUKEBUTTON__STATIC: case NUKEBUTTON__STATIC:

View file

@ -5566,7 +5566,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
sp->cstat |= 16; sp->cstat |= 16;
sp->xrepeat = 7+(krand()&7); sp->xrepeat = 7+(krand()&7);
sp->yrepeat = 7+(krand()&7); sp->yrepeat = 7+(krand()&7);
sp->z -= (16<<8); sp->z += (tilesiz[sp->picnum].y*sp->yrepeat)>>2;
if (j >= 0 && sprite[j].pal == 6) if (j >= 0 && sprite[j].pal == 6)
sp->pal = 6; sp->pal = 6;
A_AddToDeleteQueue(i); A_AddToDeleteQueue(i);