From d7a7bb3e78165381e173f25b669c9a050100ba3f Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Thu, 2 Jan 2020 22:25:52 -0600 Subject: [PATCH] Make use of renderAddTSpriteFromSprite # Conflicts: # source/blood/src/m32exec.cpp # source/rr/src/m32exec.cpp --- source/rr/src/game.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 4ed3b19a2..c192c17c4 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -615,17 +615,14 @@ static void G_OROR_DupeSprites(const spritetype *sp) if (sprite[k].picnum != SECTOREFFECTOR && sprite[k].z >= sp->z) { - Bmemcpy(&tsprite[spritesortcnt], &sprite[k], sizeof(tspritetype)); + tspriteptr_t tsp = renderAddTSpriteFromSprite(k); - tsprite[spritesortcnt].x += (refsp->x - sp->x); - tsprite[spritesortcnt].y += (refsp->y - sp->y); - tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sp->z + actor[sp->yvel].ceilingz; - tsprite[spritesortcnt].sectnum = refsp->sectnum; - tsprite[spritesortcnt].owner = k; - tsprite[spritesortcnt].extra = 0; + tsp->x += (refsp->x - sp->x); + tsp->y += (refsp->y - sp->y); + tsp->z += -sp->z + actor[sp->yvel].ceilingz; + tsp->sectnum = refsp->sectnum; -// OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z); - spritesortcnt++; +// OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z); } } }