diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index afeb6323d..f6ca7ee0f 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -928,8 +928,6 @@ struct USER void set_int_change_x(int x) { change.X = x * inttoworld; } void set_int_change_y(int x) { change.Y = x * inttoworld; } void set_int_change_z(int x) { change.Z = x * zinttoworld; } - void add_int_change_x(int x) { change.X += x * inttoworld; } - void add_int_change_y(int x) { change.Y += x * inttoworld; } // frequently repeated patterns void addCounterToChange() { change.Z += Counter * zinttoworld; } diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index 87b38b7ab..cec5e5008 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1303,8 +1303,8 @@ int PlayerInitChemBomb(PLAYER* pp) UpdateChange(actorNew, 0.5); // adjust xvel according to player velocity - actorNew->user.add_int_change_x(pp->vect.X >> 14); - actorNew->user.add_int_change_y(pp->vect.Y >> 14); + actorNew->user.change.X += FixedToFloat<18>(pp->vect.X); + actorNew->user.change.Y += FixedToFloat<18>(pp->vect.Y); // Smoke will come out for this many seconds actorNew->user.WaitTics = CHEMTICS; @@ -1645,9 +1645,6 @@ int PlayerInitCaltrops(PLAYER* pp) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) actorNew->user.Flags |= (SPR_UNDERWATER); - // They go out at different angles -// spawnedActor->spr.ang = NORM_ANGLE(pp->angle.ang.Buildang() + (RandomRange(50) - 25)); - actorNew->set_int_zvel(-pp->horizon.horiz.asq16() >> 9); oclipdist = plActor->spr.clipdist; @@ -1662,8 +1659,8 @@ int PlayerInitCaltrops(PLAYER* pp) UpdateChange(actorNew, 0.5); // adjust xvel according to player velocity - actorNew->user.add_int_change_x(pp->vect.X >> 14); - actorNew->user.add_int_change_y(pp->vect.Y >> 14); + actorNew->user.change.X += FixedToFloat<18>(pp->vect.X); + actorNew->user.change.Y += FixedToFloat<18>(pp->vect.Y); SetupSpriteForBreak(actorNew); // Put Caltrops in the break queue return 0; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index df0a43442..15439f3c8 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -15877,8 +15877,8 @@ int InitGrenade(PLAYER* pp) if (!auto_aim) { // adjust xvel according to player velocity - actorNew->user.add_int_change_x(pp->vect.X>>14); - actorNew->user.add_int_change_y(pp->vect.Y>>14); + actorNew->user.change.X += FixedToFloat<18>(pp->vect.X); + actorNew->user.change.Y += FixedToFloat<18>(pp->vect.Y); } actorNew->user.Counter2 = true; // Phosphorus Grenade @@ -15980,8 +15980,8 @@ int InitMine(PLAYER* pp) if (abs(dot) > 10000) { // adjust xvel according to player velocity - actorNew->user.add_int_change_x(pp->vect.X>>13); - actorNew->user.add_int_change_y(pp->vect.Y>>13); + actorNew->user.change.X += FixedToFloat<18>(2 * pp->vect.X); + actorNew->user.change.Y += FixedToFloat<18>(2 * pp->vect.Y); } return 0;