Commit 0c6a86e0 authored by NY00123's avatar NY00123 Committed by Evan Ramos
Browse files

SW: Remove drive_oangvel from PLAYERstruct. We can use local variables instead.

parent b2b27876
......@@ -1078,7 +1078,6 @@ struct PLAYERstruct
short slide_ang;
int slide_dec;
int drive_angvel;
int drive_oangvel;
......
......@@ -1304,7 +1304,6 @@ DoPlayerResetMovement(PLAYERp pp)
pp->slide_xvect = 0;
pp->slide_yvect = 0;
pp->drive_angvel = 0;
pp->drive_oangvel = 0;
RESET(pp->Flags, PF_PLAYER_MOVED);
}
......@@ -1661,11 +1660,11 @@ DoPlayerTurnBoat(PLAYERp pp)
if (sop->drive_angspeed)
{
pp->drive_oangvel = pp->drive_angvel;
int drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
pp->drive_angvel = (pp->drive_angvel + (drive_oangvel*(angslide-1)))/angslide;
angvel = pp->drive_angvel;
}
......@@ -1693,11 +1692,11 @@ DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist)
{
int angslide;
pp->drive_oangvel = pp->drive_angvel;
int drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
pp->drive_angvel = (pp->drive_angvel + (drive_oangvel*(angslide-1)))/angslide;
angvel = pp->drive_angvel;
}
......@@ -1726,11 +1725,11 @@ DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy)
{
int angslide;
pp->drive_oangvel = pp->drive_angvel;
int drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
pp->drive_angvel = (pp->drive_angvel + (drive_oangvel*(angslide-1)))/angslide;
angvel = pp->drive_angvel;
}
......@@ -1775,11 +1774,11 @@ DoPlayerTurnTurret(PLAYERp pp)
{
int angslide;
pp->drive_oangvel = pp->drive_angvel;
int drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
pp->drive_angvel = (pp->drive_angvel + (drive_oangvel*(angslide-1)))/angslide;
angvel = pp->drive_angvel;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment