From f996995fe5bb9440a8aec5d59b588a256a46d50e Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 13 Mar 2012 20:06:52 +0000 Subject: [PATCH] Implement changesprite{sect,stat} without temp. freelist insertion/deletion. This is simply done by using the two list helper functions defined earlier instead of a deletespriteX/insertspriteX pair. git-svn-id: https://svn.eduke32.com/eduke32@2469 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 161eced25..74eabc411 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -7666,10 +7666,8 @@ int32_t changespritesect(int16_t spritenum, int16_t newsectnum) if (sprite[spritenum].sectnum == MAXSECTORS) return(-1); - deletespritesect(spritenum); - insertspritesect(newsectnum); -// do_deletespritesect(spritenum); -// do_insertsprite_at_headofsect(spritenum, newsectnum); + do_deletespritesect(spritenum); + do_insertsprite_at_headofsect(spritenum, newsectnum); return(0); } @@ -7686,10 +7684,8 @@ int32_t changespritestat(int16_t spritenum, int16_t newstatnum) if (sprite[spritenum].statnum == MAXSTATUS) return(-1); // can't set the statnum of a sprite not in the world - deletespritestat(spritenum); - insertspritestat(newstatnum); -// do_deletespritestat(spritenum); -// do_insertsprite_at_headofstat(spritenum, newstatnum); + do_deletespritestat(spritenum); + do_insertsprite_at_headofstat(spritenum, newstatnum); return(0); }