Make use of renderAddTSpriteFromSprite

# Conflicts:
#	source/blood/src/m32exec.cpp
#	source/rr/src/m32exec.cpp
This commit is contained in:
Evan Ramos 2020-01-02 22:25:52 -06:00 committed by Christoph Oelckers
parent e363cd53a5
commit d7a7bb3e78

View file

@ -615,17 +615,14 @@ static void G_OROR_DupeSprites(const spritetype *sp)
if (sprite[k].picnum != SECTOREFFECTOR && sprite[k].z >= sp->z) 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); tsp->x += (refsp->x - sp->x);
tsprite[spritesortcnt].y += (refsp->y - sp->y); tsp->y += (refsp->y - sp->y);
tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sp->z + actor[sp->yvel].ceilingz; tsp->z += -sp->z + actor[sp->yvel].ceilingz;
tsprite[spritesortcnt].sectnum = refsp->sectnum; tsp->sectnum = refsp->sectnum;
tsprite[spritesortcnt].owner = k;
tsprite[spritesortcnt].extra = 0;
// OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z); // OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z);
spritesortcnt++;
} }
} }
} }