mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
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
This commit is contained in:
parent
4e59887198
commit
f996995fe5
1 changed files with 4 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue