X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=7fcd14612c81aaec8142a6aef1ef4332b9c14489;hb=fb3dd670570afd2a2896108f02f4c85dd6b4b55c;hp=b134886d4f6fcfc54281c1af591fb028650650c8;hpb=c7b7780a48b5ed5d6bd62099b4d43296c285dacb;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index b134886d4..7fcd14612 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -382,6 +382,7 @@ void cvar_changes_init() BADCVAR("leadlimit_and_fraglimit"); BADCVAR("leadlimit_override"); BADCVAR("pausable"); + BADCVAR("sv_allow_fullbright"); BADCVAR("sv_checkforpacketsduringsleep"); BADCVAR("sv_timeout"); BADCVAR("welcome_message_time"); @@ -392,7 +393,8 @@ void cvar_changes_init() BADPREFIX("net_"); BADPREFIX("prvm_"); BADPREFIX("skill_"); - BADPREFIX("sv_fragmessage_"); + BADPREFIX("sv_cullentities_"); + BADPREFIX("sv_fraginfo_"); BADPREFIX("sv_maxidle_"); BADPREFIX("sv_vote_"); BADPREFIX("timelimit_"); @@ -643,7 +645,7 @@ void spawnfunc_worldspawn (void) // needs to be done so early as they would still spawn RegisterWeapons(); - ServerProgsDB = db_load("server.db"); + ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid)); TemporaryDB = db_create(); @@ -786,22 +788,22 @@ void spawnfunc_worldspawn (void) continue; if(argv(0) == "cd") { - print("Found ^1DEPRECATED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n"); + print("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n"); print(" cdtrack ", argv(2), "\n"); } else if(argv(0) == "fog") { - print("Found ^1DEPRECATED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n"); + print("Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n"); print(" \"fog\" \"", s, "\"\n"); } else if(argv(0) == "set") { - print("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n"); + print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n"); print(" clientsettemp_for_type all ", argv(1), " ", argv(2), "\n"); } else if(argv(0) != "//") { - print("Found ^1DEPRECATED^7 set command in .cfg file; put this line in mapinfo instead:\n"); + print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n"); print(" clientsettemp_for_type all ", argv(0), " ", argv(1), "\n"); } } @@ -854,7 +856,11 @@ void spawnfunc_worldspawn (void) addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed); addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw); addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw); - + + // secrets + addstat(STAT_SECRETS_TOTAL, AS_FLOAT, stat_secrets_total); + addstat(STAT_SECRETS_FOUND, AS_FLOAT, stat_secrets_found); + next_pingtime = time + 5; detect_maptype(); @@ -961,7 +967,7 @@ string GetMapname() float Map_Count, Map_Current; string Map_Current_Name; -// NOTE: this now expects the map list to be already tokenize()d and the count in Map_Count +// NOTE: this now expects the map list to be already tokenized and the count in Map_Count float GetMaplistPosition() { float pos, idx; @@ -1267,11 +1273,7 @@ float DoNextMapOverride() } if (autocvar_samelevel) // if samelevel is set, stay on same level { - // this does not work because it tries to exec maps/nexdm01.mapcfg (which doesn't exist, it should be trying maps/dm_nexdm01.mapcfg for example) - //localcmd(strcat("exec \"maps/", mapname, ".mapcfg\"\n")); - // so instead just restart the current map using the restart command (DOES NOT WORK PROPERLY WITH exit_cfg STUFF) localcmd("restart\n"); - //changelevel (mapname); alreadychangedlevel = TRUE; return TRUE; } @@ -1345,9 +1347,8 @@ void IntermissionThink() { FixIntermissionClient(self); - if(autocvar_sv_autoscreenshot) - if(self.autoscreenshot > 0) - if(time > self.autoscreenshot) + if( (autocvar_sv_autoscreenshot || self.cvar_cl_autoscreenshot) + && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) ) { self.autoscreenshot = -1; if(clienttype(self) == CLIENTTYPE_REAL) @@ -2019,7 +2020,6 @@ float WinningCondition_Race(float fraglimit) return wc; } -void ReadyRestart(); float WinningCondition_QualifyingThenRace(float limit) { float wc; @@ -2041,6 +2041,9 @@ float WinningCondition_RanOutOfSpawns() if(have_team_spawns <= 0) return WINNING_NO; + if(autocvar_g_spawn_useallspawns <= 0) + return WINNING_NO; + if(!some_spawn_has_been_used) return WINNING_NO; @@ -2106,6 +2109,7 @@ CheckRules_World Exit deathmatch games upon conditions ============ */ +void ReadyRestart(); void CheckRules_World() { float timelimit; @@ -2911,7 +2915,7 @@ void RestoreGame() // some things then break, so let's work around them... // Progs DB (capture records) - ServerProgsDB = db_load("server.db"); + ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid)); // Mapinfo MapInfo_Shutdown(); @@ -2945,9 +2949,9 @@ void SV_Shutdown() if(!cheatcount_total) { if(autocvar_sv_db_saveasdump) - db_dump(ServerProgsDB, "server.db"); + db_dump(ServerProgsDB, strcat("server.db", autocvar_sessionid)); else - db_save(ServerProgsDB, "server.db"); + db_save(ServerProgsDB, strcat("server.db", autocvar_sessionid)); } if(autocvar_developer) {