From d5a74fc5a8b97a17e8795514e8d110fe566c6c00 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Fri, 12 Jun 2020 12:10:29 +0200 Subject: [PATCH] Scientist Hunt: Remove redundant player class attribute definitions. --- src/shared/scihunt/player.cpp | 90 ++++++----------------------------- 1 file changed, 14 insertions(+), 76 deletions(-) diff --git a/src/shared/scihunt/player.cpp b/src/shared/scihunt/player.cpp index 54be84ca..69c552b7 100644 --- a/src/shared/scihunt/player.cpp +++ b/src/shared/scihunt/player.cpp @@ -18,33 +18,20 @@ int input_sequence; class player:base_player { - float health; - float armor; - - /* When the weapon is done firing */ - float w_attack_next; - /* When to play the next idle animation */ - float w_idle_next; - - /* Magazine/Clip */ - int a_ammo1; - /* Rest in the inventory */ - int a_ammo2; - /* Special ammo */ - int a_ammo3; - - /* We can't use the default .items field, because FTE will assume - * effects of some bits. Such as invisibility, quad, etc. */ - int g_items; - - float activeweapon; - float viewzoom; - vector punchangle; - vector view_ofs; - float weapontime; - - /* any mods that use hooks */ - entity hook; +#ifdef CLIENT + /* External model */ + entity p_model; + int playertype; + int p_hand_bone; + int p_model_bone; + float pitch; + float lastweapon; + + virtual void(void) gun_offset; + virtual void(void) draw; + virtual float() predraw; + virtual void(void) postdraw; +#else /* Weapon specific */ int glock_mag; @@ -56,36 +43,6 @@ class player:base_player int satchel_chg; int cannon_mag; -#ifdef CLIENT - /* External model */ - entity p_model; - int playertype; - int p_hand_bone; - int p_model_bone; - float pitch; - float lastweapon; - - /* Prediction */ - vector net_origin; - vector net_velocity; - float net_flags; - float net_w_attack_next; - float net_w_idle_next; - float net_jumptime; - float net_teleport_time; - float net_weapontime; - float net_viewzoom; - vector net_punchangle; - int net_ammo1; - int net_ammo2; - int net_ammo3; - int sequence; - - virtual void(void) gun_offset; - virtual void(void) draw; - virtual float() predraw; - virtual void(void) postdraw; -#else int ammo_9mm; int ammo_357; int ammo_buckshot; @@ -99,25 +56,6 @@ class player:base_player int ammo_snark; int ammo_hornet; - /* conditional networking */ - int old_modelindex; - vector old_origin; - vector old_angles; - vector old_velocity; - int old_flags; - int old_activeweapon; - int old_items; - int old_health; - int old_armor; - int old_movetype; - int old_viewofs; - int old_baseframe; - int old_frame; - int old_a_ammo1; - int old_a_ammo2; - int old_a_ammo3; - int voted; - int sh_insanecount; float sh_insanetime; float sh_insaneactive;