mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +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)
|
if (sprite[spritenum].sectnum == MAXSECTORS)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
deletespritesect(spritenum);
|
do_deletespritesect(spritenum);
|
||||||
insertspritesect(newsectnum);
|
do_insertsprite_at_headofsect(spritenum, newsectnum);
|
||||||
// do_deletespritesect(spritenum);
|
|
||||||
// do_insertsprite_at_headofsect(spritenum, newsectnum);
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -7686,10 +7684,8 @@ int32_t changespritestat(int16_t spritenum, int16_t newstatnum)
|
||||||
if (sprite[spritenum].statnum == MAXSTATUS)
|
if (sprite[spritenum].statnum == MAXSTATUS)
|
||||||
return(-1); // can't set the statnum of a sprite not in the world
|
return(-1); // can't set the statnum of a sprite not in the world
|
||||||
|
|
||||||
deletespritestat(spritenum);
|
do_deletespritestat(spritenum);
|
||||||
insertspritestat(newstatnum);
|
do_insertsprite_at_headofstat(spritenum, newstatnum);
|
||||||
// do_deletespritestat(spritenum);
|
|
||||||
// do_insertsprite_at_headofstat(spritenum, newstatnum);
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue