- deleted wu variables in jweapon.cpp

This commit is contained in:
Christoph Oelckers 2021-12-25 21:25:34 +01:00
parent 7be6bfeb0e
commit 6b0e944e7b

View file

@ -1258,7 +1258,6 @@ int DoRadiationCloud(DSWActor* actor)
int PlayerInitChemBomb(PLAYERp pp)
{
USERp u = pp->Actor()->u();
USERp wu;
int nx, ny, nz;
short oclipdist;
@ -1277,8 +1276,6 @@ int PlayerInitChemBomb(PLAYERp pp)
auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, pp->cursector,
nx, ny, nz, pp->angle.ang.asbuild(), CHEMBOMB_VELOCITY);
wu = actorNew->u();
// don't throw it as far if crawling
if (TEST(pp->Flags, PF_CRAWLING))
{
@ -1332,10 +1329,8 @@ int PlayerInitChemBomb(PLAYERp pp)
int InitSpriteChemBomb(DSWActor* actor)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
PlaySound(DIGI_THROW, actor, v3df_dontpan | v3df_doppler);
nx = actor->spr.pos.X;
@ -1347,8 +1342,6 @@ int InitSpriteChemBomb(DSWActor* actor)
auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, actor->spr.sector(),
nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY);
wu = actorNew->u();
SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE);
SetOwner(actor, actorNew);
@ -1381,10 +1374,8 @@ int InitSpriteChemBomb(DSWActor* actor)
int InitChemBomb(DSWActor* actor)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
// Need to make it take away from inventory weapon list
// PlayerUpdateAmmo(pp, u->WeaponNum, -1);
@ -1397,8 +1388,6 @@ int InitChemBomb(DSWActor* actor)
auto actorNew = SpawnActor(STAT_MISSILE, MUSHROOM_CLOUD, s_ChemBomb, actor->spr.sector(),
nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY);
wu = actorNew->u();
SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE);
SetOwner(GetOwner(actor), actorNew);
@ -1650,7 +1639,6 @@ void SpawnFlashBombOnActor(DSWActor* actor)
int PlayerInitCaltrops(PLAYERp pp)
{
USERp u = pp->Actor()->u();
USERp wu;
int nx, ny, nz;
short oclipdist;
@ -1666,8 +1654,6 @@ int PlayerInitCaltrops(PLAYERp pp)
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, pp->cursector,
nx, ny, nz, pp->angle.ang.asbuild(), (CHEMBOMB_VELOCITY + RandomRange(CHEMBOMB_VELOCITY)) / 2);
wu = actorNew->u();
// don't throw it as far if crawling
if (TEST(pp->Flags, PF_CRAWLING))
{
@ -1720,7 +1706,6 @@ int PlayerInitCaltrops(PLAYERp pp)
int InitCaltrops(DSWActor* actor)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
PlaySound(DIGI_THROW, actor, v3df_dontpan | v3df_doppler);
@ -1734,8 +1719,6 @@ int InitCaltrops(DSWActor* actor)
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, actor->spr.sector(),
nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY / 2);
wu = actorNew->u();
SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE);
SetOwner(actor, actorNew);
@ -1765,11 +1748,9 @@ int InitCaltrops(DSWActor* actor)
int InitPhosphorus(DSWActor* actor)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
short daang;
PlaySound(DIGI_FIREBALL1, actor, v3df_follow);
nx = actor->spr.pos.X;
@ -1783,8 +1764,6 @@ int InitPhosphorus(DSWActor* actor)
auto actorNew = SpawnActor(STAT_SKIP4, FIREBALL1, s_Phosphorus, actor->spr.sector(),
nx, ny, nz, daang, CHEMBOMB_VELOCITY/3);
wu = actorNew->u();
actorNew->spr.hitag = LUMINOUS; // Always full brightness
SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE);
// !Frank - don't do translucent
@ -1818,7 +1797,6 @@ int InitPhosphorus(DSWActor* actor)
int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
short i, cnt, ang, vel, rnd;
@ -1863,8 +1841,6 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSprayChunk, actor->spr.sector(),
nx, ny, nz, ang, vel*2);
wu = actorNew->u();
SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE);
if (dogib)
SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER);
@ -2228,7 +2204,6 @@ int DoFlag(DSWActor* actor)
int SpawnShell(DSWActor* actor, int ShellNum)
{
USERp u = actor->u();
USERp wu;
int nx, ny, nz;
short id=0,velocity=0;
STATEp p=nullptr;
@ -2257,8 +2232,6 @@ int SpawnShell(DSWActor* actor, int ShellNum)
auto actorNew = SpawnActor(STAT_SKIP4, id, p, actor->spr.sector(), nx, ny, nz, actor->spr.ang, 64);
wu = actorNew->u();
actorNew->spr.zvel = -(velocity);
if (u->PlayerP)