mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- interpolate p->TiltStatus
for RR(RA).
This commit is contained in:
parent
cdb8e5b94e
commit
293c1af4c2
3 changed files with 12 additions and 10 deletions
|
@ -113,7 +113,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
{
|
||||
int cw;
|
||||
int i, j;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, look_anghalf;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, look_anghalf, TiltStatus;
|
||||
char o,pal;
|
||||
signed char gs;
|
||||
|
||||
|
@ -125,6 +125,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
look_anghalf = getHalfLookAng(snum, cl_syncinput, smoothratio);
|
||||
looking_arc = fabs(look_anghalf) / 4.5;
|
||||
weapon_sway = p->oweapon_sway + fmulscale16((p->weapon_sway - p->oweapon_sway), smoothratio);
|
||||
TiltStatus = !cl_syncinput ? p->TiltStatus : p->oTiltStatus + fmulscale16((p->TiltStatus - p->oTiltStatus), smoothratio);
|
||||
|
||||
if (shadedsector[p->cursectnum] == 1)
|
||||
gs = 16;
|
||||
|
@ -215,17 +216,17 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if (p->TiltStatus >= 0)
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, p->TiltStatus*5);
|
||||
if (TiltStatus >= 0)
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, TiltStatus*5);
|
||||
else if (p->TiltStatus < 0)
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, p->TiltStatus*5+2047);
|
||||
ShowMotorcycle(160-look_anghalf, 174, temp_kb, gs, 0, pal, TiltStatus*5+2047);
|
||||
return;
|
||||
}
|
||||
if (p->OnBoat)
|
||||
{
|
||||
int temp2, temp_kb, temp3;
|
||||
temp2 = 0;
|
||||
if (p->TiltStatus > 0)
|
||||
if (TiltStatus > 0)
|
||||
{
|
||||
if (*kb == 0)
|
||||
temp_kb = BOATHIT+1;
|
||||
|
@ -242,7 +243,7 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
else
|
||||
temp_kb = BOATHIT+1;
|
||||
}
|
||||
else if (p->TiltStatus < 0)
|
||||
else if (TiltStatus < 0)
|
||||
{
|
||||
if (*kb == 0)
|
||||
temp_kb = BOATHIT+2;
|
||||
|
@ -290,10 +291,10 @@ void displayweapon_r(int snum, double smoothratio)
|
|||
if (temp2)
|
||||
gs = -96;
|
||||
|
||||
if (p->TiltStatus >= 0)
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, p->TiltStatus);
|
||||
if (TiltStatus >= 0)
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, TiltStatus);
|
||||
else if (p->TiltStatus < 0)
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, p->TiltStatus+2047);
|
||||
ShowBoat(160-look_anghalf, temp3, temp_kb, gs, 0, pal, TiltStatus+2047);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -927,6 +927,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info,
|
|||
static double motoApplyTurn(player_struct* p, int turnl, int turnr, int bike_turn, bool goback, double factor)
|
||||
{
|
||||
int turnvel = 0;
|
||||
p->oTiltStatus = p->TiltStatus;
|
||||
|
||||
if (p->MotoSpeed == 0 || !p->on_ground)
|
||||
{
|
||||
|
|
|
@ -202,7 +202,7 @@ struct player_struct
|
|||
int SeaSick;
|
||||
short MamaEnd; // raat609
|
||||
short MotoSpeed, moto_drink;
|
||||
float TiltStatus;
|
||||
float TiltStatus, oTiltStatus;
|
||||
short VBumpNow, VBumpTarget, TurbCount;
|
||||
short drug_stat[3]; // raat5f1..5
|
||||
uint8_t DrugMode, lotag800kill;
|
||||
|
|
Loading…
Reference in a new issue