mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- eliminated spritetype::clear.
Most uses were bad anyway, and the legitimate ones are just clearing the object.
This commit is contained in:
parent
51abee4351
commit
2bb7cecf27
8 changed files with 2 additions and 22 deletions
|
@ -280,7 +280,7 @@ void validateSprite(spritetype& spr, int sectnum, int index)
|
|||
}
|
||||
if (bugged)
|
||||
{
|
||||
spr.clear();
|
||||
spr = {};
|
||||
spr.statnum = MAXSTATUS;
|
||||
sectnum = -1;
|
||||
}
|
||||
|
|
|
@ -455,17 +455,6 @@ struct spritetype : public spritetypebase
|
|||
int16_t wall; // wall and wdist are for Polymost only.
|
||||
int8_t wdist;
|
||||
|
||||
void clear()
|
||||
{
|
||||
auto sect = sectp;
|
||||
int stat = statnum;
|
||||
int save = time; // this may not be cleared ever!!!
|
||||
memset(this, 0, sizeof(*this));
|
||||
time = save;
|
||||
sectp = sect;
|
||||
statnum = stat;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -476,7 +476,7 @@ void dbLoadMap(const char* pPath, int* pX, int* pY, int* pZ, short* pAngle, sect
|
|||
dbCrypt((char*)&load, sizeof(spritetypedisk), (gMapRev * sizeof(spritetypedisk)) | 0x7474614d);
|
||||
}
|
||||
auto pSprite = &sprites.sprites[i];
|
||||
pSprite->clear();
|
||||
*pSprite = {};
|
||||
pSprite->pos.X = LittleLong(load.x);
|
||||
pSprite->pos.Y = LittleLong(load.y);
|
||||
pSprite->pos.Z = LittleLong(load.z);
|
||||
|
|
|
@ -1113,7 +1113,6 @@ void BunnyHatch(DSWActor* actor)
|
|||
for (int i = 0; i < MAX_BUNNYS; i++)
|
||||
{
|
||||
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
||||
actorNew->spr.clear();
|
||||
actorNew->spr.pos = actor->spr.pos;
|
||||
actorNew->spr.xrepeat = 30; // Baby size
|
||||
actorNew->spr.yrepeat = 24;
|
||||
|
@ -1170,7 +1169,6 @@ DSWActor* BunnyHatch2(DSWActor* actor)
|
|||
{
|
||||
|
||||
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
||||
actorNew->spr.clear();
|
||||
actorNew->spr.pos.X = actor->spr.pos.X;
|
||||
actorNew->spr.pos.Y = actor->spr.pos.Y;
|
||||
actorNew->spr.pos.Z = actor->spr.pos.Z;
|
||||
|
|
|
@ -1173,7 +1173,6 @@ void RipperHatch(DSWActor* actor)
|
|||
for (int i = 0; i < MAX_RIPPERS; i++)
|
||||
{
|
||||
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
||||
actorNew->spr.clear();
|
||||
ClearOwner(actorNew);
|
||||
actorNew->spr.pos.X = actor->spr.pos.X;
|
||||
actorNew->spr.pos.Y = actor->spr.pos.Y;
|
||||
|
|
|
@ -1198,7 +1198,6 @@ void Ripper2Hatch(DSWActor* actor)
|
|||
for (int i = 0; i < MAX_RIPPER2S; i++)
|
||||
{
|
||||
auto actorNew = insertActor(actor->sector(), STAT_DEFAULT);
|
||||
actorNew->spr.clear();
|
||||
ClearOwner(actorNew);
|
||||
actorNew->spr.pos = actor->spr.pos;
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ DSWActor* insertActor(sectortype* sect, int statnum)
|
|||
{
|
||||
auto pActor = static_cast<DSWActor*>(::InsertActor(RUNTIME_CLASS(DSWActor), sect, statnum));
|
||||
|
||||
pActor->spr.clear();
|
||||
pActor->spr.owner = -1;
|
||||
return pActor;
|
||||
}
|
||||
|
|
|
@ -756,11 +756,7 @@ void KillActor(DSWActor* actor)
|
|||
{
|
||||
SetSuicide(actor->user.flameActor);
|
||||
}
|
||||
actor->clearUser();
|
||||
}
|
||||
|
||||
// shred your garbage
|
||||
actor->spr.clear();
|
||||
actor->Destroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue