X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fworld.qc;h=b61f75ceb7068f00bf85b76a05a88f04a016dac9;hb=44b19a9101514c2f7c60db341fc08bc677278901;hp=9734bcef54507a3f4193f57c892e8193e5f3124c;hpb=efccc7ec36a933fb2543a63dcc7ae31ab129138f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 9734bcef5..b61f75ceb 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -69,7 +69,7 @@ void PingPLReport_Think(entity this) { WriteHeader(MSG_BROADCAST, TE_CSQC_PINGPLREPORT); WriteByte(MSG_BROADCAST, this.cnt); - WriteShort(MSG_BROADCAST, bound(1, CS(e).ping, 65535)); + WriteShort(MSG_BROADCAST, bound(1, CS(e).ping, 32767)); WriteByte(MSG_BROADCAST, min(ceil(CS(e).ping_packetloss * 255), 255)); WriteByte(MSG_BROADCAST, min(ceil(CS(e).ping_movementloss * 255), 255)); @@ -100,7 +100,6 @@ void PingPLReport_Spawn() } const float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1; -float world_initialized; void SetDefaultAlpha() { @@ -171,6 +170,7 @@ 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 +#define BADVALUE(p, val) if (k == p && v == val) 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 @@ -491,6 +491,7 @@ void cvar_changes_init() BADCVAR("sv_motd"); BADCVAR("sv_public"); BADCVAR("sv_ready_restart"); + BADCVAR("sv_showfps"); BADCVAR("sv_status_privacy"); BADCVAR("sv_taunt"); BADCVAR("sv_vote_call"); @@ -500,6 +501,8 @@ void cvar_changes_init() BADCVAR("sv_vote_master_commands"); BADCVAR("sv_vote_master_password"); BADCVAR("sv_vote_simple_majority_factor"); + BADVALUE("sys_ticrate", "0.0166667"); + BADVALUE("sys_ticrate", "0.0333333"); BADCVAR("teamplay_mode"); BADCVAR("timelimit_override"); BADPREFIX("g_warmup_"); @@ -520,15 +523,10 @@ void cvar_changes_init() BADCVAR("g_lms_weaponarena"); BADCVAR("g_ctf_stalemate_time"); - if(cvar_string("g_mod_balance") == "Testing") - { - // (temporary) while using the Testing balance, any weapon balance cvars are allowed to be changed - BADPREFIX("g_balance_"); - } - #undef BADPRESUFFIX #undef BADPREFIX #undef BADCVAR +#undef BADVALUE if(pureadding) { @@ -1192,7 +1190,7 @@ void DumpStats(float final) s = strcat(s, GetGametype(), "_", GetMapname(), ":", ftos(rint(time))); if(to_console) - LOG_INFO(s); + LOG_HELP(s); if(to_eventlog) GameLogEcho(s); @@ -1208,7 +1206,7 @@ void DumpStats(float final) s = strcat(":labels:player:", GetPlayerScoreString(NULL, 0)); if(to_console) - LOG_INFO(s); + LOG_HELP(s); if(to_eventlog) GameLogEcho(s); if(to_file) @@ -1223,7 +1221,7 @@ void DumpStats(float final) s = strcat(s, "spectator:"); if(to_console) - LOG_INFO(s, playername(it.netname, it.team, false)); + LOG_HELP(s, playername(it.netname, it.team, false)); if(to_eventlog) GameLogEcho(strcat(s, ftos(it.playerid), ":", playername(it.netname, it.team, false))); if(to_file) @@ -1234,7 +1232,7 @@ void DumpStats(float final) { s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0)); if(to_console) - LOG_INFO(s); + LOG_HELP(s); if(to_eventlog) GameLogEcho(s); if(to_file) @@ -1245,7 +1243,7 @@ void DumpStats(float final) s = strcat(":teamscores:see-labels:", GetTeamScoreString(i, 0)); s = strcat(s, ":", ftos(i)); if(to_console) - LOG_INFO(s); + LOG_HELP(s); if(to_eventlog) GameLogEcho(s); if(to_file) @@ -1254,7 +1252,7 @@ void DumpStats(float final) } if(to_console) - LOG_INFO(":end"); + LOG_HELP(":end"); if(to_eventlog) GameLogEcho(":end"); if(to_file) @@ -1835,7 +1833,7 @@ void readplayerstartcvars() start_ammo_plasma = 0; if (random_start_ammo == NULL) { - random_start_ammo = new(random_start_ammo); + random_start_ammo = new_pure(random_start_ammo); } start_health = cvar("g_balance_health_start"); start_armorvalue = cvar("g_balance_armor_start"); @@ -1967,7 +1965,7 @@ void readplayerstartcvars() random_start_weapons_count = cvar("g_random_start_weapons_count"); SetResource(random_start_ammo, RES_SHELLS, cvar("g_random_start_shells")); SetResource(random_start_ammo, RES_BULLETS, cvar("g_random_start_bullets")); - SetResource(random_start_ammo, RES_ROCKETS,cvar("g_random_start_rockets")); + SetResource(random_start_ammo, RES_ROCKETS, cvar("g_random_start_rockets")); SetResource(random_start_ammo, RES_CELLS, cvar("g_random_start_cells")); SetResource(random_start_ammo, RES_PLASMA, cvar("g_random_start_plasma")); } @@ -2027,16 +2025,11 @@ void readplayerstartcvars() start_ammo_cells = max(0, start_ammo_cells); start_ammo_plasma = max(0, start_ammo_plasma); start_ammo_fuel = max(0, start_ammo_fuel); - SetResource(random_start_ammo, RES_SHELLS, - max(0, GetResource(random_start_ammo, RES_SHELLS))); - SetResource(random_start_ammo, RES_BULLETS, - max(0, GetResource(random_start_ammo, RES_BULLETS))); - SetResource(random_start_ammo, RES_ROCKETS, - max(0, GetResource(random_start_ammo, RES_ROCKETS))); - SetResource(random_start_ammo, RES_CELLS, - max(0, GetResource(random_start_ammo, RES_CELLS))); - SetResource(random_start_ammo, RES_PLASMA, - max(0, GetResource(random_start_ammo, RES_PLASMA))); + SetResource(random_start_ammo, RES_SHELLS, max(0, GetResource(random_start_ammo, RES_SHELLS))); + SetResource(random_start_ammo, RES_BULLETS, max(0, GetResource(random_start_ammo, RES_BULLETS))); + SetResource(random_start_ammo, RES_ROCKETS, max(0, GetResource(random_start_ammo, RES_ROCKETS))); + SetResource(random_start_ammo, RES_CELLS, max(0, GetResource(random_start_ammo, RES_CELLS))); + SetResource(random_start_ammo, RES_PLASMA, max(0, GetResource(random_start_ammo, RES_PLASMA))); warmup_start_ammo_shells = max(0, warmup_start_ammo_shells); warmup_start_ammo_nails = max(0, warmup_start_ammo_nails);