mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
SW: Remove drive_oangvel from PLAYERstruct. We can use local variables instead.
This commit is contained in:
parent
6aecd46dbc
commit
b84975e406
2 changed files with 8 additions and 10 deletions
|
@ -1158,7 +1158,6 @@ struct PLAYERstruct
|
||||||
short slide_ang;
|
short slide_ang;
|
||||||
int slide_dec;
|
int slide_dec;
|
||||||
int drive_angvel;
|
int drive_angvel;
|
||||||
int drive_oangvel;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1300,7 +1300,6 @@ DoPlayerResetMovement(PLAYERp pp)
|
||||||
pp->slide_xvect = 0;
|
pp->slide_xvect = 0;
|
||||||
pp->slide_yvect = 0;
|
pp->slide_yvect = 0;
|
||||||
pp->drive_angvel = 0;
|
pp->drive_angvel = 0;
|
||||||
pp->drive_oangvel = 0;
|
|
||||||
RESET(pp->Flags, PF_PLAYER_MOVED);
|
RESET(pp->Flags, PF_PLAYER_MOVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1656,11 +1655,11 @@ DoPlayerTurnBoat(PLAYERp pp)
|
||||||
|
|
||||||
if (sop->drive_angspeed)
|
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);
|
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
|
||||||
|
|
||||||
angslide = sop->drive_angslide;
|
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;
|
angvel = pp->drive_angvel;
|
||||||
}
|
}
|
||||||
|
@ -1688,11 +1687,11 @@ DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist)
|
||||||
{
|
{
|
||||||
int angslide;
|
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);
|
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
|
||||||
|
|
||||||
angslide = sop->drive_angslide;
|
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;
|
angvel = pp->drive_angvel;
|
||||||
}
|
}
|
||||||
|
@ -1721,11 +1720,11 @@ DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy)
|
||||||
{
|
{
|
||||||
int angslide;
|
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);
|
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
|
||||||
|
|
||||||
angslide = sop->drive_angslide;
|
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;
|
angvel = pp->drive_angvel;
|
||||||
}
|
}
|
||||||
|
@ -1770,11 +1769,11 @@ DoPlayerTurnTurret(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int angslide;
|
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);
|
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
|
||||||
|
|
||||||
angslide = sop->drive_angslide;
|
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;
|
angvel = pp->drive_angvel;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue