Prediction: Roll back .viewzoom, as that was forgotten about before.

This commit is contained in:
Marco Cawthorne 2019-09-08 12:15:46 +02:00
parent 3112040047
commit 4da3cf5079
4 changed files with 7 additions and 1 deletions

View File

@ -30,6 +30,7 @@ void Predict_PreFrame(player pl)
pl.netflags = pl.flags;
pl.netjumptime = pl.jumptime;
pl.netteleport_time = pl.teleport_time;
pl.netviewzoom = pl.viewzoom;
#ifdef VALVE
pl.net_w_attack_next = pl.w_attack_next;
@ -80,6 +81,7 @@ void Predict_PostFrame(player pl)
pl.flags = pl.netflags;
pl.jumptime = pl.netjumptime;
pl.teleport_time = pl.netteleport_time;
pl.viewzoom = pl.netviewzoom;
#ifdef VALVE
pl.w_attack_next = pl.net_w_attack_next;

View File

@ -69,6 +69,7 @@ class player
float net_weapontime;
float netjumptime;
float netteleport_time;
float netviewzoom;
int net_ammo1;
int net_ammo2;
int net_ammo3;

View File

@ -67,6 +67,7 @@ class player
float netjumptime;
float netteleport_time;
float net_weapontime;
float netviewzoom;
int net_ammo1;
int net_ammo2;
int net_ammo3;

View File

@ -112,6 +112,7 @@ void w_python_primary(void)
pl.w_attack_next = 0.75f;
pl.w_idle_next = 10.0f;
}
void w_python_secondary(void)
{
player pl = (player)self;
@ -120,12 +121,13 @@ void w_python_secondary(void)
}
/* Simple toggle of fovs */
if (pl.viewzoom == 1.0f) {
pl.viewzoom = 0.5;
pl.viewzoom = 0.5f;
} else {
pl.viewzoom = 1.0f;
}
pl.w_attack_next = 0.5f;
}
void w_python_reload(void)
{
player pl = (player)self;