mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 10:11:04 +00:00
- deleted insertAllSprites.
This commit is contained in:
parent
d3b1e34d78
commit
cf9d733994
1 changed files with 0 additions and 50 deletions
|
@ -361,56 +361,6 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void insertAllSprites(SpawnSpriteDef& sprites)
|
|
||||||
{
|
|
||||||
// This function is stupid because it exploits side effects of insertsprite and should be redone by only inserting the valid sprites.
|
|
||||||
int i, realnumsprites = sprites.sprites.Size();
|
|
||||||
int numsprites = realnumsprites;
|
|
||||||
|
|
||||||
for (i = 0; i < numsprites; i++)
|
|
||||||
{
|
|
||||||
auto actor = actorArray[i];
|
|
||||||
bool removeit = false;
|
|
||||||
auto& spr = actor->s();
|
|
||||||
spr = sprites.sprites[i];
|
|
||||||
if (sprites.sprext.Size()) actor->sx() = sprites.sprext[i];
|
|
||||||
else actor->sx() = {};
|
|
||||||
actor->sm() = {};
|
|
||||||
|
|
||||||
if (spr.statnum == MAXSTATUS)
|
|
||||||
{
|
|
||||||
spr.statnum = spr.sectnum = 0;
|
|
||||||
removeit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//insertsprite(spr.sectnum, spr.statnum, true);
|
|
||||||
|
|
||||||
if (removeit)
|
|
||||||
{
|
|
||||||
spr.statnum = MAXSTATUS;
|
|
||||||
realnumsprites--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (numsprites != realnumsprites)
|
|
||||||
{
|
|
||||||
for (i = 0; i < numsprites; i++)
|
|
||||||
{
|
|
||||||
auto actor = actorArray[i];
|
|
||||||
auto& spr = actor->s();
|
|
||||||
|
|
||||||
if (spr.statnum == MAXSTATUS)
|
|
||||||
{
|
|
||||||
// Now remove it for real!
|
|
||||||
spr.statnum = 0;
|
|
||||||
//deletesprite(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(realnumsprites == Numsprites);
|
|
||||||
}
|
|
||||||
|
|
||||||
void addBlockingPairs();
|
void addBlockingPairs();
|
||||||
|
|
||||||
// allocates global map storage. Blood will also call this.
|
// allocates global map storage. Blood will also call this.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue