X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=374f17c7bbe3d334f27f2e83c3a99dda6a4e24f7;hb=b8f71d297050680a3b25b063375ca5feec9ff67b;hp=02d82f27a91cdbfbe579f1e371cb690cc81e2eab;hpb=fc9b0d9f7b3baded6a49630983428ab489b5d7f3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 02d82f27a..374f17c7b 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -237,6 +237,10 @@ void cvar_changes_init() #define BADPREFIX(p) if(substring(k, 0, strlen(p)) == p) continue #define BADPRESUFFIX(p,s) if(substring(k, 0, strlen(p)) == p && substring(k, -strlen(s), -1) == s) continue #define BADCVAR(p) if(k == p) continue + + // general excludes and namespaces for server admin used cvars + BADPREFIX("help_"); // PN's server has this listed as changed, let's not rat him out for THAT + // internal BADPREFIX("csqc_"); BADPREFIX("cvar_check_"); @@ -437,6 +441,7 @@ void cvar_changes_init() BADCVAR("hostname"); BADCVAR("log_file"); BADCVAR("maxplayers"); + BADCVAR("g_maxplayers"); BADCVAR("minplayers"); BADCVAR("net_address"); BADCVAR("port"); @@ -820,6 +825,9 @@ void spawnfunc_worldspawn (void) addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit); addstat(STAT_BULLETS_LOADED, AS_INT, sniperrifle_bulletcounter); addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup); + addstat(STAT_HIT_TIME, AS_FLOAT, hit_time); + addstat(STAT_TYPEHIT_TIME, AS_FLOAT, typehit_time); + addstat(STAT_LAYED_MINES, AS_INT, minelayer_mines); addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge); addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo); @@ -1523,11 +1531,6 @@ void DumpStats(float final) fputs(file, ":end\n"); fclose(file); } - - // send statistics - FOR_EACH_CLIENT(e) - PlayerStats_AddGlobalInfo(e); - PlayerStats_Shutdown(); } void FixIntermissionClient(entity e) @@ -1596,6 +1599,13 @@ void NextLevel() DumpStats(TRUE); + // send statistics + entity e; + PlayerStats_EndMatch(1); + FOR_EACH_CLIENT(e) + PlayerStats_AddGlobalInfo(e); + PlayerStats_Shutdown(); + if(autocvar_sv_eventlog) GameLogEcho(":gameover"); @@ -2833,16 +2843,16 @@ void EndFrame() if(self.classname == "spectator") { if(self.enemy.typehitsound) - play2(self, "misc/typehit.wav"); - else if(self.enemy.hitsound && self.cvar_cl_hitsound) - play2(self, "misc/hit.wav"); + self.typehit_time = time; + else if(self.enemy.hitsound) + self.hit_time = time; } else { if(self.typehitsound) - play2(self, "misc/typehit.wav"); - else if(self.hitsound && self.cvar_cl_hitsound) - play2(self, "misc/hit.wav"); + self.typehit_time = time; + else if(self.hitsound) + self.hit_time = time; } } altime = time + frametime * (1 + autocvar_g_antilag_nudge); @@ -2940,6 +2950,7 @@ void SV_Shutdown() print("Saving persistent data...\n"); Ban_SaveBans(); + PlayerStats_EndMatch(0); FOR_EACH_CLIENT(e) PlayerStats_AddGlobalInfo(e); PlayerStats_Shutdown();