From 33c8668325704e83b97607b33545f4e178430073 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 24 Dec 2021 19:47:18 +0100 Subject: [PATCH] - deleted all np variables. --- source/games/sw/src/bunny.cpp | 7 +--- source/games/sw/src/coolg.cpp | 2 -- source/games/sw/src/jweapon.cpp | 11 +----- source/games/sw/src/ripper.cpp | 2 -- source/games/sw/src/ripper2.cpp | 8 ++--- source/games/sw/src/sprite.cpp | 59 +++++++++++---------------------- source/games/sw/src/track.cpp | 4 +-- source/games/sw/src/weapon.cpp | 37 ++------------------- 8 files changed, 27 insertions(+), 103 deletions(-) diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 7b7427a67..0bb240faa 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -1138,7 +1138,6 @@ void BunnyHatch(DSWActor* actor) { USERp u = actor->u(); - SPRITEp np; USERp nu; const int MAX_BUNNYS = 1; int16_t rip_ang[MAX_BUNNYS]; @@ -1148,11 +1147,8 @@ void BunnyHatch(DSWActor* actor) for (int i = 0; i < MAX_BUNNYS; i++) { auto actorNew = insertActor(actor->spr.sector(), STAT_DEFAULT); - np = &actorNew->s(); 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; + actorNew->spr.pos = actor->spr.pos; actorNew->spr.xrepeat = 30; // Baby size actorNew->spr.yrepeat = 24; actorNew->spr.ang = rip_ang[i]; @@ -1209,7 +1205,6 @@ DSWActor* BunnyHatch2(DSWActor* actor) { auto actorNew = insertActor(actor->spr.sector(), STAT_DEFAULT); - auto np = &actorNew->s(); actorNew->spr.clear(); actorNew->spr.pos.X = actor->spr.pos.X; actorNew->spr.pos.Y = actor->spr.pos.Y; diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index 54d9b4ec7..b05d7976e 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -546,13 +546,11 @@ int NewCoolg(DSWActor* actor) { USERp u = actor->u(); USERp nu; - SPRITEp np; ANIMATOR DoActorDecide; auto actorNew = SpawnActor(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 50); nu = actorNew->u(); - np = &actorNew->s(); ChangeState(actorNew, &s_CoolgBirth[0]); nu->StateEnd = s_CoolgDie; diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index b584015b1..fec43c2e0 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -297,13 +297,11 @@ int DoWallBloodDrip(DSWActor* actor) void SpawnMidSplash(DSWActor* actor) { USERp u = actor->u(); - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_GoreSplash, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, ActorZOfMiddle(actor), actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -12; @@ -327,13 +325,11 @@ void SpawnMidSplash(DSWActor* actor) void SpawnFloorSplash(DSWActor* actor) { USERp u = actor->u(); - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_GoreFloorSplash, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -12; @@ -540,7 +536,6 @@ int DoBloodSpray(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSpray, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100); - auto np = &actorNew->s(); auto nu = actorNew->u(); SetOwner(actor, actorNew); @@ -752,7 +747,6 @@ int DoPhosphorus(DSWActor* actor) auto actorNew = SpawnActor(STAT_SKIP4, PUFF, s_PhosphorExp, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100); - auto np = &actorNew->s(); auto nu = actorNew->u(); actorNew->spr.hitag = LUMINOUS; // Always full brightness @@ -980,7 +974,6 @@ int DoChemBomb(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100); - auto np = &actorNew->s(); auto nu = actorNew->u(); SetOwner(actor, actorNew); @@ -1219,7 +1212,6 @@ int SpawnRadiationCloud(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - RANDOM_P2(Z(8)), actor->spr.ang, 0); - auto np = &actorNew->s(); nu = actorNew->u(); SetOwner(GetOwner(actor), actorNew); @@ -1668,7 +1660,6 @@ void SpawnFlashBombOnActor(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - auto np = &actorNew->s(); auto nu = actorNew->u(); if (u->flameActor != nullptr) @@ -1679,7 +1670,7 @@ void SpawnFlashBombOnActor(DSWActor* actor) if (u->flameActor != nullptr) { - nu->Counter = GetRepeatFromHeight(np, ActorSizeZ(actor) >> 1) * 4; + nu->Counter = GetRepeatFromHeight(actorNew, ActorSizeZ(actor) >> 1) * 4; } else nu->Counter = 0; // max flame size diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index e79bbeaa0..941e5983e 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -1198,7 +1198,6 @@ int DoRipperStandHeart(DSWActor* actor) void RipperHatch(DSWActor* actor) { - SPRITEp np; USERp nu; const int MAX_RIPPERS = 1; short rip_ang[MAX_RIPPERS]; @@ -1208,7 +1207,6 @@ void RipperHatch(DSWActor* actor) for (int i = 0; i < MAX_RIPPERS; i++) { auto actorNew = insertActor(actor->spr.sector(), STAT_DEFAULT); - np = &actorNew->s(); actorNew->spr.clear(); ClearOwner(actorNew); actorNew->spr.pos.X = actor->spr.pos.X; diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index 817692461..f89d6a827 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -1215,7 +1215,6 @@ int DoRipper2StandHeart(DSWActor* actor) void Ripper2Hatch(DSWActor* actor) { - SPRITEp np; USERp nu; const int MAX_RIPPER2S = 1; @@ -1227,13 +1226,10 @@ void Ripper2Hatch(DSWActor* actor) for (int i = 0; i < MAX_RIPPER2S; i++) { auto actorNew = insertActor(actor->spr.sector(), STAT_DEFAULT); - np = &actorNew->s(); actorNew->spr.clear(); ClearOwner(actorNew); - actorNew->spr.pos.X = actor->spr.pos.X; - actorNew->spr.pos.Y = actor->spr.pos.Y; - actorNew->spr.pos.Z = actor->spr.pos.Z; - //actorNew->spr.xrepeat = actorNew->spr.yrepeat = 36; + actorNew->spr.pos = actor->spr.pos; + actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64; actorNew->spr.ang = rip_ang[i]; actorNew->spr.pal = 0; diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 76214e7aa..63d3caef1 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -2537,13 +2537,10 @@ void SpriteSetup(void) // make a QUICK_LADDER sprite automatically auto actorNew = insertActor(sp->sector(), STAT_QUICK_LADDER); - auto np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; - actorNew->spr.pos.X = sp->pos.X; - actorNew->spr.pos.Y = sp->pos.Y; - actorNew->spr.pos.Z = sp->pos.Z; + actorNew->spr.pos = sp->pos; actorNew->spr.ang = NORM_ANGLE(sp->ang + 1024); actorNew->spr.picnum = sp->picnum; @@ -3572,7 +3569,6 @@ int ActorCoughItem(DSWActor* actor) SPRITEp sp = &actor->s(); USERp u = actor->u(); short choose; - SPRITEp np; DSWActor* actorNew = nullptr; @@ -3581,7 +3577,6 @@ int ActorCoughItem(DSWActor* actor) case SAILORGIRL_R0: ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3591,9 +3586,9 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.extra = 0; // vel - SP_TAG7(np) = 1; + SP_TAG7(actorNew) = 1; // zvel - SP_TAG8(np) = 40; + SP_TAG8(actorNew) = 40; choose = RANDOM_P2(1024); @@ -3613,7 +3608,7 @@ int ActorCoughItem(DSWActor* actor) // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; @@ -3623,7 +3618,6 @@ int ActorCoughItem(DSWActor* actor) ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3633,16 +3627,16 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.extra = 0; // vel - SP_TAG7(np) = 1; + SP_TAG7(actorNew) = 1; // zvel - SP_TAG8(np) = 40; + SP_TAG8(actorNew) = 40; SP_TAG3(actorNew) = 69; // Match number // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; @@ -3652,7 +3646,6 @@ int ActorCoughItem(DSWActor* actor) ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3662,16 +3655,16 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.extra = 0; // vel - SP_TAG7(np) = 1; + SP_TAG7(actorNew) = 1; // zvel - SP_TAG8(np) = 40; + SP_TAG8(actorNew) = 40; SP_TAG3(actorNew) = 70; // Match number // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; @@ -3684,7 +3677,6 @@ int ActorCoughItem(DSWActor* actor) ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3694,9 +3686,9 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.extra = 0; // vel - SP_TAG7(np) = 1; + SP_TAG7(actorNew) = 1; // zvel - SP_TAG8(np) = 40; + SP_TAG8(actorNew) = 40; switch (u->WeaponNum) { @@ -3737,7 +3729,7 @@ int ActorCoughItem(DSWActor* actor) // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; } @@ -3747,7 +3739,6 @@ int ActorCoughItem(DSWActor* actor) ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3757,9 +3748,9 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.extra = 0; // vel - SP_TAG7(np) = 1; + SP_TAG7(actorNew) = 1; // zvel - SP_TAG8(np) = 40; + SP_TAG8(actorNew) = 40; if (u->spal == PAL_XLAT_LT_TAN) { @@ -3795,7 +3786,7 @@ int ActorCoughItem(DSWActor* actor) // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; @@ -3806,7 +3797,6 @@ int ActorCoughItem(DSWActor* actor) ASSERT(sp->insector()); actorNew = insertActor(sp->sector(), STAT_SPAWN_ITEMS); - np = &actorNew->s(); actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; @@ -3815,9 +3805,9 @@ int ActorCoughItem(DSWActor* actor) actorNew->spr.ang = sp->ang; // vel - SP_TAG7(np) = 10; + SP_TAG7(actorNew) = 10; // zvel - SP_TAG8(np) = 10; + SP_TAG8(actorNew) = 10; if (u->ID == PACHINKO1) { @@ -3851,7 +3841,7 @@ int ActorCoughItem(DSWActor* actor) // match SP_TAG2(actorNew) = -1; // kill - RESET_BOOL1(np); + RESET_BOOL1(actorNew); SpawnItemsMatch(-1); break; } @@ -4909,7 +4899,6 @@ int KillGet(DSWActor* actor) SPRITEp sp = &actor->s(); USERp nu; - SPRITEp np; switch (gNet.MultiGameType) { @@ -4936,7 +4925,6 @@ int KillGet(DSWActor* actor) auto actorNew = SpawnActor(STAT_ITEM, Red_COIN, s_RedCoin, sp->sector(), sp->pos.X, sp->pos.Y, sp->pos.Z, 0, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -20; @@ -4953,7 +4941,6 @@ int KillGetAmmo(DSWActor* actor) SPRITEp sp = &actor->s(); USERp nu; - SPRITEp np; switch (gNet.MultiGameType) { @@ -4988,7 +4975,6 @@ int KillGetAmmo(DSWActor* actor) auto actorNew = SpawnActor(STAT_ITEM, Red_COIN, s_RedCoin, sp->sector(), sp->pos.X, sp->pos.Y, sp->pos.Z, 0, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -20; @@ -5005,7 +4991,6 @@ int KillGetWeapon(DSWActor* actor) SPRITEp sp = &actor->s(); USERp nu; - SPRITEp np; switch (gNet.MultiGameType) { @@ -5048,7 +5033,6 @@ int KillGetWeapon(DSWActor* actor) auto actorNew = SpawnActor(STAT_ITEM, Red_COIN, s_RedCoin, sp->sector(), sp->pos.X, sp->pos.Y, sp->pos.Z, 0, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -20; @@ -5154,9 +5138,7 @@ int DoGet(DSWActor* actor) // For flag stuff USERp nu; - SPRITEp np; - - + // Invisiblility is only used for DeathMatch type games // Sprites stays invisible for a period of time and is un-gettable // then "Re-Spawns" by becomming visible. Its never actually killed. @@ -5998,7 +5980,6 @@ KeyMain: actorNew = SpawnActor(STAT_ITEM, ICON_FLAG, s_CarryFlag, sp->sector(), sp->pos.X, sp->pos.Y, sp->pos.Z, 0, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -20; diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 9711fb0d0..0c9f97b7a 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -311,12 +311,10 @@ void TrackAddPoint(TRACKp t, TRACK_POINTp tp, DSWActor* actor) DSWActor* TrackClonePoint(DSWActor* actor) { - SPRITEp sp = &actor->s(), np; + SPRITEp sp = &actor->s(); auto actorNew = insertActor(sp->sector(), sp->statnum); - np = &actorNew->s(); - actorNew->spr.cstat = 0; actorNew->spr.extra = 0; actorNew->spr.pos.X = sp->pos.X; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c287ed1ca..c74eb749b 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -3949,7 +3949,6 @@ int DoShrapDamage(DSWActor* actor) int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, int hit_y, int hit_z) { auto u = actor->u(); - SPRITEp np; USERp nu; int i; @@ -4119,7 +4118,6 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i { auto actorNew = SpawnActor(STAT_SKIP4, p->id, p->state, actor->spr.sector(), hit_x, hit_y, hit_z, hit_ang, 0); - np = &actorNew->s(); nu = actorNew->u(); switch (nu->ID) @@ -8100,13 +8098,11 @@ int DoBlurExtend(DSWActor* actor, int16_t interval, int16_t blur_num) int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor) { - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, PLASMA_FOUNTAIN, s_PlasmaFountain, sActor->spr.sector(), sActor->spr.pos.X, sActor->spr.pos.Y, ActorZOfBottom(sActor), sActor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -40; @@ -8595,13 +8591,11 @@ int DoGrenade(DSWActor* actor) // if you haven't bounced or your going slow do some puffs if (!TEST(u->Flags, SPR_BOUNCE|SPR_UNDERWATER)) { - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100); - np = &actorNew->s(); nu = actorNew->u(); SetOwner(actor, actorNew); @@ -9370,7 +9364,6 @@ int DoTracerStart(DSWActor* actor) int DoLaser(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; short spawn_count = 0; @@ -9397,7 +9390,6 @@ int DoLaser(DSWActor* actor) { auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_LaserPuff, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.shade = -40; @@ -9439,7 +9431,6 @@ int DoLaserStart(DSWActor* actor) int DoRail(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; short spawn_count = 0; @@ -9493,7 +9484,6 @@ int DoRail(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, PUFF, &s_RailPuff[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 20); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.xvel += (RandomRange(140)-RandomRange(140)); @@ -9595,14 +9585,11 @@ int DoRocket(DSWActor* actor) if (!u->Counter) { - SPRITEp np; USERp nu; - auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(), pos.X, pos.Y, pos.Z, actor->spr.ang, 100); - np = &actorNew->s(); nu = actorNew->u(); SetOwner(actor, actorNew); @@ -9701,13 +9688,11 @@ int DoMicro(DSWActor* actor) if (!u->Counter) { - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100); - np = &actorNew->s(); nu = actorNew->u(); SetOwner(GetOwner(actor), actorNew); @@ -10061,7 +10046,6 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor) auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - auto np = &actorNew->s(); auto nu = actorNew->u(); actorNew->spr.hitag = LUMINOUS; //Always full brightness @@ -10077,11 +10061,11 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor) if (TEST(ep->extra, SPRX_BURNABLE)) { int sizez = GetSpriteSizeZ(ep) + (GetSpriteSizeZ(ep) >> 2); - nu->Counter = GetRepeatFromHeight(np, sizez); + nu->Counter = GetRepeatFromHeight(actorNew, sizez); } else { - nu->Counter = GetRepeatFromHeight(np, GetSpriteSizeZ(ep)>>1); + nu->Counter = GetRepeatFromHeight(actorNew, GetSpriteSizeZ(ep)>>1); } } else @@ -10124,11 +10108,9 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor) int SpawnBreakFlames(DSWActor* actor) { USERp u = actor->u(); - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.hitag = LUMINOUS; //Always full brightness @@ -10161,12 +10143,10 @@ int SpawnBreakFlames(DSWActor* actor) void SpawnBreakStaticFlames(DSWActor* actor) { USERp u = actor->u(); - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_STATIC_FIRE, FIREBALL_FLAMES, nullptr, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); if (RandomRange(1000) > 500) @@ -11417,7 +11397,6 @@ int DoMirvMissile(DSWActor* actor) int DoMirv(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; u->coll = move_missile(actor, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -11445,7 +11424,6 @@ int DoMirv(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, MIRV_METEOR, &sg_MirvMeteor[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, NORM_ANGLE(actor->spr.ang + angs[i]), 800); - np = &actorNew->s(); nu = actorNew->u(); nu->RotNum = 5; @@ -11964,7 +11942,6 @@ void InitVulcanBoulder(DSWActor* actor) int InitSerpRing(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; short ang, ang_diff, ang_start, missiles; short max_missiles; @@ -11988,7 +11965,6 @@ int InitSerpRing(DSWActor* actor) for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++) { auto actorNew = SpawnActor(STAT_SKIP4, SKULL_SERP, &s_SkullRing[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.xvel = 500; @@ -12767,7 +12743,6 @@ int InitSumoNapalm(DSWActor* actor) int InitSumoSkull(DSWActor* actor) { - SPRITEp np; USERp u = actor->u(), nu; extern STATE s_SkullExplode[]; @@ -12780,7 +12755,6 @@ int InitSumoSkull(DSWActor* actor) auto actorNew = SpawnActor(STAT_ENEMY, SKULL_R0, &s_SkullWait[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, ActorZOfMiddle(actor), actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.xvel = 500; @@ -14744,7 +14718,6 @@ int InitSerpSpell(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 1500); - auto np = &actorNew->s(); nu = actorNew->u(); actorNew->spr.pos.Z = ActorZOfTop(actor); @@ -14829,7 +14802,6 @@ int SpawnDemonFist(DSWActor* actor) int InitSerpMonstSpell(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; int dist; short i; @@ -14853,7 +14825,6 @@ int InitSerpMonstSpell(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 500); - np = &actorNew->s(); nu = actorNew->u(); nu->spal = actorNew->spr.pal = 25; // Bright Red @@ -18121,7 +18092,6 @@ int DoWaterSmoke(DSWActor* actor) int SpawnVehicleSmoke(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; if (MoveSkip2 != 0) @@ -18130,7 +18100,6 @@ int SpawnVehicleSmoke(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_VehicleSmoke, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - RANDOM_P2(Z(8)), actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); nu->WaitTics = 1*120; @@ -18157,13 +18126,11 @@ int SpawnVehicleSmoke(DSWActor* actor) int SpawnSmokePuff(DSWActor* actor) { USER* u = actor->u(); - SPRITEp np; USERp nu; auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_WaterSmoke, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - RANDOM_P2(Z(8)), actor->spr.ang, 0); - np = &actorNew->s(); nu = actorNew->u(); nu->WaitTics = 1*120;