Networked ammo variables now predicted
This commit is contained in:
parent
356ca638b5
commit
549a5b32bf
3 changed files with 15 additions and 4 deletions
|
@ -26,6 +26,9 @@ void Predict_PreFrame(player pl)
|
|||
#ifdef VALVE
|
||||
pl.net_w_attack_next = pl.w_attack_next;
|
||||
pl.net_w_idle_next = pl.w_idle_next;
|
||||
pl.net_ammo1 = pl.a_ammo1;
|
||||
pl.net_ammo2 = pl.a_ammo2;
|
||||
pl.net_ammo3 = pl.a_ammo3;
|
||||
#endif
|
||||
|
||||
//self.netpmove_flags = self.pmove_flags;
|
||||
|
@ -71,6 +74,9 @@ void Predict_PostFrame(player pl)
|
|||
#ifdef VALVE
|
||||
pl.w_attack_next = pl.net_w_attack_next;
|
||||
pl.w_idle_next = pl.net_w_idle_next;
|
||||
pl.a_ammo1 = pl.net_ammo1;
|
||||
pl.a_ammo2 = pl.net_ammo2;
|
||||
pl.a_ammo3 = pl.net_ammo3;
|
||||
#endif
|
||||
|
||||
//self.pmove_flags = self.netpmove_flags;
|
||||
|
|
|
@ -51,8 +51,10 @@ class player
|
|||
float net_w_idle_next;
|
||||
float netjumptime;
|
||||
float netteleport_time;
|
||||
|
||||
virtual void() set_model;
|
||||
int net_ammo1;
|
||||
int net_ammo2;
|
||||
int net_ammo3;
|
||||
virtual void(string) set_model;
|
||||
virtual void() gun_offset;
|
||||
virtual void() draw;
|
||||
virtual float() predraw;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
class player
|
||||
{
|
||||
float health;
|
||||
|
@ -50,8 +49,11 @@ class player
|
|||
float net_w_idle_next;
|
||||
float netjumptime;
|
||||
float netteleport_time;
|
||||
int net_ammo1;
|
||||
int net_ammo2;
|
||||
int net_ammo3;
|
||||
|
||||
virtual void() set_model;
|
||||
virtual void(string) set_model;
|
||||
virtual void() gun_offset;
|
||||
virtual void() draw;
|
||||
virtual float() predraw;
|
||||
|
@ -71,3 +73,4 @@ class player
|
|||
int ammo_hornet;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue