- it is not necessary to clear the owner of a freshly spawned actor.

They are always spawned owner-less.
This commit is contained in:
Christoph Oelckers 2021-11-03 22:51:21 +01:00
parent 9cefc351a1
commit deddd7d514
6 changed files with 1 additions and 10 deletions

View file

@ -1173,7 +1173,6 @@ void BunnyHatch(DSWActor* actor)
np->x = sp->x;
np->y = sp->y;
np->z = sp->z;
ClearOwner(actorNew);
np->xrepeat = 30; // Baby size
np->yrepeat = 24;
np->ang = rip_ang[i];
@ -1239,7 +1238,6 @@ DSWActor* BunnyHatch2(DSWActor* actor)
np->x = wp->x;
np->y = wp->y;
np->z = wp->z;
ClearOwner(actorNew);
np->xrepeat = 30; // Baby size
np->yrepeat = 24;
np->ang = RANDOM_P2(2048);

View file

@ -64,7 +64,6 @@ short CopyQuakeSpotToOn(SPRITEp sp)
np->cstat = 0;
np->extra = 0;
ClearOwner(actorNew);
change_actor_stat(actorNew, STAT_QUAKE_ON);
@ -248,7 +247,6 @@ int SpawnQuake(short sectnum, int x, int y, int z,
sp->y = y;
sp->z = z;
sp->cstat = 0;
ClearOwner(actorNew);
sp->extra = 0;
QUAKE_Match(sp) = -1;

View file

@ -1240,8 +1240,6 @@ void RipperHatch(DSWActor* actor)
np->x = wp->x;
np->y = wp->y;
np->z = wp->z;
ClearOwner(actorNew);
//np->xrepeat = np->yrepeat = 36;
np->xrepeat = np->yrepeat = 64;
np->ang = rip_ang[i];
np->pal = 0;

View file

@ -1250,7 +1250,6 @@ void Ripper2Hatch(DSWActor* actor)
np->x = wp->x;
np->y = wp->y;
np->z = wp->z;
ClearOwner(actorNew);
//np->xrepeat = np->yrepeat = 36;
np->xrepeat = np->yrepeat = 64;
np->ang = rip_ang[i];

View file

@ -985,7 +985,6 @@ int16_t SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, in
sp->xvel = vel;
sp->zvel = 0;
sp->owner = -1;
sp->lotag = 0L;
sp->hitag = 0L;
sp->extra = 0;
@ -2974,7 +2973,7 @@ void SpriteSetup(void)
case SPEAR_TRAP:
{
u = SpawnUser(actor, 0, nullptr);
sp->owner = -1;
ClearOwner(actor);
change_actor_stat(actor, STAT_TRAP);
break;
}

View file

@ -176,7 +176,6 @@ void SpawnVis(DSWActor* parentActor, short sectnum, int x, int y, int z, int amt
sp->x = x;
sp->y = y;
sp->z = z - Z(20);
ClearOwner(actorNew);
}
sp->cstat = 0;