]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qh
Merge branch 'master' into z411/bai-server
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qh
index 9611df4e87980f2fb639198e7f94fd1cae7f70ca..cb71a3eaa59298632061a5276fbeb6475dc5910c 100644 (file)
@@ -50,6 +50,7 @@ float autocvar_gameversion_max;
 string autocvar_hostname;
 int autocvar_spawn_debug;
 string autocvar_sv_motd;
+string autocvar_sv_motd_permanent;
 int autocvar_sv_name_maxlength = 64;
 string autocvar_sv_quickmenu_file;
 bool autocvar_sv_servermodelsonly;
@@ -58,6 +59,21 @@ int autocvar_sv_spectate;
 bool autocvar_sv_teamnagger;
 float autocvar_sv_player_scale;
 
+// z411
+string autocvar_hostname_full;
+string autocvar_g_teamnames_red;
+string autocvar_g_teamnames_blue;
+string autocvar_g_teamnames_yellow;
+string autocvar_g_teamnames_pink;
+
+void send_TeamNames(int channel, entity to);
+
+// Medals
+float autocvar_g_medals_excellent_time = 2;
+
+// Timer
+int autocvar_sv_timer_countdown = 1; // 0 = disabled, 1 = enabled, 2 = spect only
+
 // WEAPONTODO
 .string weaponorder_byimpulse;
 
@@ -72,7 +88,9 @@ float autocvar_sv_player_scale;
 .int spectatee_status;
 .bool zoomstate;
 
+.bool team_selected;
 .bool just_joined;
+.bool wants_join;
 
 .int pressedkeys;
 
@@ -89,6 +107,8 @@ CLASS(Client, Object)
     ATTRIB(Client, colormap, int, this.colormap);
     ATTRIB(Client, team, int, this.team);
     ATTRIB(Client, clientcolors, int, this.clientcolors);
+       ATTRIB(Client, countrycode, int, this.countrycode);
+       ATTRIB(Client, rank, string, this.rank);
     /** Client IP */
     ATTRIB(Client, netaddress, string, this.netaddress);
     ATTRIB(Client, playermodel, string, this.playermodel);
@@ -158,6 +178,7 @@ CLASS(Client, Object)
     ATTRIB(Client, teamkill_soundsource, entity, this.teamkill_soundsource);
     ATTRIB(Client, usekeypressed, bool, this.usekeypressed);
     ATTRIB(Client, jointime, float, this.jointime);
+    ATTRIB(Client, wants_join, bool, this.wants_join);
     ATTRIB(Client, spectatortime, float, this.spectatortime);
     ATTRIB(Client, startplaytime, float, this.startplaytime);
     ATTRIB(Client, version_nagtime, float, this.version_nagtime);
@@ -204,6 +225,7 @@ CLASS(Client, Object)
     ATTRIB(Client, cvar_cl_pokenade_type, string, this.cvar_cl_pokenade_type);
     ATTRIB(Client, cvar_cl_spawn_near_teammate, bool, this.cvar_cl_spawn_near_teammate);
     ATTRIB(Client, cvar_cl_gunalign, int, this.cvar_cl_gunalign);
+       ATTRIB(Client, cvar_cl_chat_sounds, bool, this.cvar_cl_chat_sounds);
     ATTRIB(Client, cvar_cl_handicap, float, this.cvar_cl_handicap);
     ATTRIB(Client, cvar_cl_clippedspectating, bool, this.cvar_cl_clippedspectating);
     ATTRIB(Client, cvar_cl_autoscreenshot, int, this.cvar_cl_autoscreenshot);
@@ -308,7 +330,10 @@ bool independent_players;
 #define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
 #define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME))
 
+.float lastkill;
+.int countrycode;
 .int killcount;
+.string rank; // RJZ
 
 //flood fields
 .float nickspamtime; // time of last nick change
@@ -392,7 +417,7 @@ void SetSpectatee_status(entity this, int spectatee_num);
 
 void FixPlayermodel(entity player);
 
-void GiveWarmupResources(entity this);
+void ResetPlayerResources(entity this);
 
 void ClientInit_misc(entity this);
 
@@ -408,3 +433,9 @@ void PlayerFrame (entity this);
 #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }
 
 const int MAX_SPECTATORS = 7;
+
+float _medal_times;
+#define Give_Medal(entity,medalname) \
+       _medal_times = GameRules_scoring_add(entity, MEDAL_##medalname, 1); \
+       Send_Notification(NOTIF_ONE, entity, MSG_MEDAL, MEDAL_##medalname, _medal_times);
+