From 87c8e86d44ffb510f9d3c681b72a94aadcc12cac Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 21 Oct 2015 19:54:02 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/actors.c | 12 +++++++++--- polymer/eduke32/source/game.c | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index b6a02c2b8..03d74b940 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4984,10 +4984,16 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5 case BLOODSPLAT3__STATIC: case BLOODSPLAT4__STATIC: - if (t[0] == 7*GAMETICSPERSEC) goto BOLT; - s->z += 16+(krand()&15); + if (t[0] == 3*GAMETICSPERSEC) goto BOLT; + actor[i].bpos.z -= s->z; 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; case NUKEBUTTON__STATIC: diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ece0b5c57..229a40525 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5566,7 +5566,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) sp->cstat |= 16; sp->xrepeat = 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) sp->pal = 6; A_AddToDeleteQueue(i);