X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=e258e351a79892f5e9c8199dd4fada280f12e6b0;hb=76afe6b4bb64b3f349bcf8aeadd04d0b319a7d01;hp=511a448b4e5d20467b240aa6b202509483cd4c34;hpb=fcf08084198fd3ec4b9a9e282f7d19acd97883b4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 511a448b4..e258e351a 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -11,17 +11,22 @@ #include "command/sv_cmd.qh" #include "command/vote.qh" #include "g_hook.qh" +#include +#include #include "ipban.qh" #include "mapvoting.qh" #include #include "race.qh" #include "scores.qh" #include "scores_rules.qh" +#include "spawnpoints.qh" #include "teamplay.qh" #include "weapons/weaponstats.qh" +#include #include "../common/constants.qh" #include #include "../common/deathtypes/all.qh" +#include #include "../common/gamemodes/sv_rules.qh" #include "../common/mapinfo.qh" #include "../common/monsters/_mod.qh" @@ -32,6 +37,7 @@ #include "../common/playerstats.qh" #include "../common/stats.qh" #include "../common/teams.qh" +#include #include "../common/mapobjects/trigger/secret.qh" #include "../common/mapobjects/target/music.qh" #include "../common/util.qh" @@ -259,6 +265,7 @@ void cvar_changes_init() BADCVAR("g_ca"); BADCVAR("g_ca_teams"); BADCVAR("g_conquest"); + BADCVAR("g_conquest_teams"); BADCVAR("g_ctf"); BADCVAR("g_cts"); BADCVAR("g_dotc"); @@ -286,6 +293,8 @@ void cvar_changes_init() BADCVAR("g_runematch"); BADCVAR("g_shootfromeye"); BADCVAR("g_snafu"); + BADCVAR("g_survival"); + BADCVAR("g_survival_not_dm_maps"); BADCVAR("g_tdm"); BADCVAR("g_tdm_on_dm_maps"); BADCVAR("g_tdm_teams"); @@ -294,6 +303,7 @@ void cvar_changes_init() BADCVAR("nextmap"); BADCVAR("teamplay"); BADCVAR("timelimit"); + BADCVAR("g_mapinfo_settemp_acl"); BADCVAR("g_mapinfo_ignore_warnings"); BADCVAR("g_maplist_ignore_sizes"); BADCVAR("g_maplist_sizes_count_bots"); @@ -347,8 +357,11 @@ void cvar_changes_init() BADCVAR("g_freezetag_point_limit"); BADCVAR("g_glowtrails"); BADCVAR("g_hats"); + BADCVAR("g_casings"); BADCVAR("g_invasion_point_limit"); BADCVAR("g_jump_grunt"); + BADCVAR("g_keepaway_ballcarrier_effects"); + BADCVAR("g_keepawayball_effects"); BADCVAR("g_keyhunt_point_leadlimit"); BADCVAR("g_nexball_goalleadlimit"); BADCVAR("g_new_toys_autoreplace"); @@ -926,8 +939,6 @@ spawnfunc(worldspawn) Nagger_Init(); - next_pingtime = time + 5; - // set up information replies for clients and server to use maplist_reply = strzone(getmaplist()); lsmaps_reply = strzone(getlsmaps()); @@ -2064,21 +2075,20 @@ void Physics_Frame() IL_EACH(g_moveables, true, { - if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_PUSH || it.move_movetype == MOVETYPE_FAKEPUSH || it.move_movetype == MOVETYPE_PHYSICS) + if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_PHYSICS) continue; //set_movetype(it, it.move_movetype); // inline the set_movetype function, since this is called a lot - it.movetype = (it.move_qcphysics) ? MOVETYPE_NONE : it.move_movetype; - - if(it.move_movetype == MOVETYPE_NONE) - continue; + it.movetype = (it.move_qcphysics) ? MOVETYPE_QCENTITY : it.move_movetype; - if(it.move_qcphysics) + if(it.move_qcphysics && it.move_movetype != MOVETYPE_NONE) Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false); if(it.movetype >= MOVETYPE_USER_FIRST && it.movetype <= MOVETYPE_USER_LAST) // these cases have no think handling { + if(it.move_movetype == MOVETYPE_PUSH || it.move_movetype == MOVETYPE_FAKEPUSH) + continue; // these movetypes have no regular think function // handle thinking here if (getthink(it) && it.nextthink > 0 && it.nextthink <= time + frametime) RunThink(it); @@ -2090,7 +2100,7 @@ void Physics_Frame() IL_EACH(g_moveables, it.move_qcphysics, { - if(IS_CLIENT(it) || is_pure(it) || it.classname == "" || it.move_movetype == MOVETYPE_NONE) + if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_NONE) continue; Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false); }); @@ -2210,6 +2220,11 @@ void Shutdown() if(world_initialized > 0) { world_initialized = 0; + + // if a timeout is active, reset the slowmo value to normal + if(timeout_status == TIMEOUT_ACTIVE) + cvar_set("slowmo", ftos(orig_slowmo)); + LOG_TRACE("Saving persistent data..."); Ban_SaveBans();