diff --git a/source/core/coreactor.h b/source/core/coreactor.h index fd2e1745d..b44387d30 100644 --- a/source/core/coreactor.h +++ b/source/core/coreactor.h @@ -77,11 +77,6 @@ public: return { int(spr.pos.X * worldtoint), int(spr.pos.Y * worldtoint), int(spr.pos.Z * zworldtoint) }; } - void set_int_z(int z) - { - spr.pos.Z = z * zinttoworld; - } - void add_int_z(int z) { spr.pos.Z += z * zinttoworld; diff --git a/source/core/maptypes.h b/source/core/maptypes.h index 42adf60ce..c7c51b5db 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -526,10 +526,6 @@ struct tspritetype : public spritetypebase { pos.Z += x * zinttoworld; } - void set_int_z(int x) - { - pos.Z = x * zinttoworld; - } }; class tspriteArray diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index e78b87296..280ce3a43 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -690,7 +690,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw { auto sect = actor->sector(); double vel, zvel; - int l, scount; + int scount; if (actor->spr.extra >= 0) actor->spr.shade = -96; @@ -767,23 +767,23 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw { if (actor->spr.picnum == BOSS3) { - DVector2 offset(ang.Sin() * 4, ang.Cos() * -4); + DVector2 spawnofs(ang.Sin() * 4, ang.Cos() * -4); DAngle aoffs = DAngle22_5 / 32.; if ((krand() & 1) != 0) { - offset = -offset; + spawnofs = -spawnofs; aoffs = -aoffs; } if (isWorldTour()) // Twentieth Anniversary World Tour { float siz = actor->spr.yrepeat / 80.0f; - offset *= siz; + spawnofs *= siz; aoffs *= siz; } - spawned->spr.pos += offset; + spawned->spr.pos += spawnofs; spawned->spr.angle += aoffs; spawned->spr.xrepeat = 42; @@ -791,16 +791,16 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw } else if (actor->spr.picnum == BOSS2) { - DVector2 offset(ang.Sin() * (1024. / 56.), ang.Cos() * -(1024. / 56.)); + DVector2 spawnofs(ang.Sin() * (1024. / 56.), ang.Cos() * -(1024. / 56.)); DAngle aoffs = DAngle22_5 / 16. - DAngle45 + randomAngle(90); if (isWorldTour()) { // Twentieth Anniversary World Tour double siz = actor->spr.yrepeat / 70.; - offset *= siz; + spawnofs *= siz; aoffs *= siz; } - spawned->spr.pos += offset; + spawned->spr.pos += spawnofs; spawned->spr.angle += aoffs; spawned->spr.xrepeat = 24; @@ -821,13 +821,13 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw if (ps[p].hbomb_hold_delay) { - DVector2 offset(-ang.Sin()* (1024. / 644.), ang.Cos() * (1024. / 644.)); - spawned->spr.pos += offset; + DVector2 spawnofs(-ang.Sin()* (1024. / 644.), ang.Cos() * (1024. / 644.)); + spawned->spr.pos += spawnofs; } else { - DVector2 offset(ang.Sin()* 4, ang.Cos() * -4); - spawned->spr.pos += offset; + DVector2 spawnofs(ang.Sin()* 4, ang.Cos() * -4); + spawned->spr.pos += spawnofs; } spawned->spr.xrepeat >>= 1; spawned->spr.yrepeat >>= 1; @@ -1076,8 +1076,7 @@ static void shootshrinker(DDukeActor* actor, int p, int sx, int sy, int sz, int void shoot_d(DDukeActor* actor, int atwith) { - int l, j; - int sx, sy, sz, sa, p, vel, zvel, x, dal; + int sx, sy, sz, sa, p, zvel; if (actor->isPlayer()) { p = actor->PlayerIndex(); diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 4878c39a4..1a357f7e2 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -1068,8 +1068,8 @@ void lotsofglass(DDukeActor *actor, walltype* wal, int n) z = sect->floorz - krandf(abs(sect->ceilingz - sect->floorz)); if (fabs(z) > 32) z = actor->spr.pos.Z - 32 + krandf(64); - DAngle a = actor->spr.angle - DAngle180; - CreateActor(actor->sector(), DVector3(pos, z), TILE_GLASSPIECES + (j % 3), -32, 36, 36, a.Buildang(), 32 + (krand() & 63), -(krand() & 1023), actor, 5); + DAngle angl = actor->spr.angle - DAngle180; + CreateActor(actor->sector(), DVector3(pos, z), TILE_GLASSPIECES + (j % 3), -32, 36, 36, angl.Buildang(), 32 + (krand() & 63), -(krand() & 1023), actor, 5); } } }