]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qh
Send the welcome message together with the gametype on connection in order to avoid...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qh
index abda1204aba38bed656a63abf7fd76bfce5a62de..5fc5422c63f7e55e5d4316f1a91fad7f3b0bdce5 100644 (file)
@@ -2,9 +2,60 @@
 
 #include "utils.qh"
 #include <server/intermission.qh>
+//#include <common/resources/resources.qh>
 #include <common/replicate.qh>
 #include <common/sounds/all.qh>
 
+bool autocvar__notarget;
+int autocvar_g_balance_armor_start;
+float autocvar_g_balance_pause_armor_rot_spawn;
+float autocvar_g_balance_pause_fuel_rot_spawn;
+float autocvar_g_balance_pause_health_regen_spawn;
+float autocvar_g_balance_pause_health_rot_spawn;
+bool autocvar_g_botclip_collisions;
+bool autocvar_g_fullbrightplayers;
+bool autocvar_g_playerclip_collisions;
+float autocvar_g_player_alpha;
+float autocvar_g_player_brightness;
+float autocvar_g_player_damageforcescale = 2;
+float autocvar_g_respawn_delay_small;
+int autocvar_g_respawn_delay_small_count;
+float autocvar_g_respawn_delay_large;
+int autocvar_g_respawn_delay_large_count;
+float autocvar_g_respawn_delay_max;
+bool autocvar_g_respawn_delay_forced;
+bool autocvar_g_respawn_ghosts;
+float autocvar_g_respawn_ghosts_alpha = 1;
+float autocvar_g_respawn_ghosts_fadetime = 1.5;
+float autocvar_g_respawn_ghosts_time = 4.5;
+float autocvar_g_respawn_ghosts_speed;
+int autocvar_g_respawn_waves;
+bool autocvar_g_nodepthtestplayers;
+string autocvar_g_mutatormsg;
+float autocvar_sv_foginterval;
+float autocvar_sv_maxidle;
+int autocvar_sv_maxidle_minplayers = 2;
+float autocvar_sv_maxidle_playertospectator = 60;
+bool autocvar_sv_maxidle_alsokickspectators;
+int autocvar_sv_maxidle_slots;
+bool autocvar_sv_maxidle_slots_countbots;
+bool autocvar_g_forced_respawn;
+int autocvar_g_maxplayers;
+float autocvar_g_maxplayers_spectator_blocktime;
+string autocvar_g_xonoticversion;
+float autocvar_gameversion;
+float autocvar_gameversion_min;
+float autocvar_gameversion_max;
+string autocvar_hostname;
+int autocvar_spawn_debug;
+string autocvar_sv_motd;
+int autocvar_sv_name_maxlength = 64;
+bool autocvar_sv_servermodelsonly;
+int autocvar_sv_spectate;
+bool autocvar_sv_teamnagger;
+float autocvar_sv_player_scale;
+bool autocvar_sv_showspectators;
+
 // WEAPONTODO
 .string weaponorder_byimpulse;
 
@@ -124,7 +175,6 @@ CLASS(Client, Object)
     ATTRIB(Client, zoomstate, bool, this.zoomstate);
     ATTRIB(Client, just_joined, bool, this.just_joined);
     ATTRIB(Client, race_completed, bool, this.race_completed);
-    ATTRIBARRAY(Client, msg_choice_choices, int, 20); // TODO: actually NOTIF_CHOICE_MAX
     ATTRIB(Client, latency_sum, float, this.latency_sum);
     ATTRIB(Client, latency_cnt, int, this.latency_cnt);
     ATTRIB(Client, latency_time, float, this.latency_time);
@@ -144,6 +194,9 @@ CLASS(Client, Object)
 
     // networked cvars
 
+// not currently handled by ClientState
+#if 0
+    ATTRIBARRAY(Client, msg_choice_choices, int, 20); // TODO: actually NOTIF_CHOICE_MAX
     ATTRIB(Client, cvar_cl_allow_uid2name, int, this.cvar_cl_allow_uid2name);
     ATTRIB(Client, cvar_cl_allow_uidtracking, int, this.cvar_cl_allow_uidtracking);
     ATTRIB(Client, cvar_cl_autotaunt, float, this.cvar_cl_autotaunt);
@@ -159,13 +212,13 @@ CLASS(Client, Object)
     ATTRIB(Client, cvar_cl_clippedspectating, bool, this.cvar_cl_clippedspectating);
     ATTRIB(Client, cvar_cl_autoscreenshot, int, this.cvar_cl_autoscreenshot);
     ATTRIB(Client, cvar_cl_jetpack_jump, bool, this.cvar_cl_jetpack_jump);
-    ATTRIB(Client, cvar_cl_newusekeysupported, bool, this.cvar_cl_newusekeysupported);
     ATTRIB(Client, cvar_cl_noantilag, bool, this.cvar_cl_noantilag);
     ATTRIB(Client, cvar_cl_movement_track_canjump, bool, this.cvar_cl_movement_track_canjump);
     ATTRIB(Client, cvar_cl_weaponimpulsemode, int, this.cvar_cl_weaponimpulsemode);
     ATTRIB(Client, cvar_g_xonoticversion, string, this.cvar_g_xonoticversion);
-    ATTRIB(Client, autoswitch, bool, this.autoswitch);
+    ATTRIB(Client, cvar_cl_autoswitch, bool, this.cvar_cl_autoswitch);
     ATTRIB(Client, cvar_cl_casings, bool, this.cvar_cl_casings);
+    ATTRIB(Client, cvar_r_drawviewmodel, bool, this.cvar_r_drawviewmodel);
     ATTRIB(Client, cvar_cl_dodging_timeout, float, this.cvar_cl_dodging_timeout);
     ATTRIB(Client, cvar_cl_dodging, float, this.cvar_cl_dodging);
     ATTRIB(Client, cvar_cl_multijump, bool, this.cvar_cl_multijump);
@@ -176,6 +229,7 @@ CLASS(Client, Object)
     ATTRIB(Client, cvar_cl_cts_noautoswitch, bool, this.cvar_cl_cts_noautoswitch);
     ATTRIB(Client, cvar_cl_weapon_switch_reload, bool, this.cvar_cl_weapon_switch_reload);
     ATTRIB(Client, cvar_cl_weapon_switch_fallback_to_impulse, bool, this.cvar_cl_weapon_switch_fallback_to_impulse);
+#endif
 
     METHOD(Client, m_unwind, bool(Client this));
 
@@ -222,9 +276,6 @@ CLASS(Player, Client)
     ATTRIB(Player, dual_weapons, vector, this.dual_weapons); // TODO: actually WepSet!
     ATTRIB(Player, itemkeys, int, this.itemkeys);
     ATTRIB(Player, ballistics_density, float, this.ballistics_density);
-    ATTRIB(Player, prevstrengthsound, float, this.prevstrengthsound);
-    ATTRIB(Player, prevstrengthsoundattempt, float, this.prevstrengthsoundattempt);
-    ATTRIB(Player, buff_shield, float, this.buff_shield);
 
     INIT(Player) {
         this.classname = STR_PLAYER;
@@ -269,6 +320,8 @@ bool independent_players;
 .float nickspamtime; // time of last nick change
 .float nickspamcount;
 
+void SendWelcomemessage_msg_type(entity this, bool force_centerprint, int msg_type);
+
 // respawning
 .int respawn_flags;
 .float respawn_time;
@@ -312,8 +365,6 @@ void ClientData_Touch(entity e);
 
 int nJoinAllowed(entity this, entity ignore);
 
-void checkSpectatorBlock(entity this);
-
 void PlayerUseKey(entity this);
 
 void FixClientCvars(entity e);
@@ -325,14 +376,18 @@ IntrusiveList g_initforplayer;
 STATIC_INIT(g_initforplayer) { g_initforplayer = IL_NEW(); }
 
 void play_countdown(entity this, float finished, Sound samp);
+void player_powerups_remove_all(entity this);
 
-void RotRegen(entity this, float current, float regenstable, float regenfactor, float regenlinear, float regenframetime, float rotstable, float rotfactor, float rotlinear, float rotframetime, float limit_mod);
+// NOTE: current type is Resource (avoiding circular includes!)
+void RotRegen(entity this, entity current, float limit_mod,
+       float regenstable, float regenfactor, float regenlinear, float regenframetime,
+       float rotstable, float rotfactor, float rotlinear, float rotframetime);
 
 bool Spectate(entity this, entity pl);
 
 void ClientInit_Spawn();
 
-void PutObserverInServer(entity this);
+void PutObserverInServer(entity this, bool is_forced, bool use_spawnpoint);
 
 void SetSpectatee(entity this, entity spectatee);
 void SetSpectatee_status(entity this, int spectatee_num);