X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=15dce3d80617d16949b0c54f2a077d1dd5f63ea5;hb=49d458814ee6def9f22548da8b288bc7ae7dbc47;hp=001fbc5bb5d2d5dd718bbd188eddbf1a4dd5c307;hpb=7072a9dc696dc5bd2a5a2c4c706c4a2f5c0a24c5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 001fbc5bb..15dce3d80 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -340,9 +340,6 @@ void cvar_changes_init() BADCVAR("gameversion"); BADPREFIX("gameversion_"); BADCVAR("sv_namechangetimer"); -#ifndef NO_LEGACY_NETWORKING - BADCVAR("sv_use_csqc_players"); // transition -#endif // allowed changes to server admins (please sync this to server.cfg) // vi commands: @@ -558,6 +555,8 @@ void spawnfunc___init_dedicated_server(void) MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); + + print("^1YO SAMUAL, CHECK THIS SHIT OUT MOTHERFUCKER! _init spawnfunc was called!\n"); } void Map_MarkAsRecent(string m); @@ -598,6 +597,8 @@ void spawnfunc_worldspawn (void) head = nextent(head); } + server_is_dedicated = (cvar_defstring("is_dedicated") ? TRUE : FALSE); + // needs to be done so early because of the constants they create CALL_ACCUMULATED_FUNCTION(RegisterWeapons); CALL_ACCUMULATED_FUNCTION(RegisterGametypes); @@ -673,9 +674,6 @@ void spawnfunc_worldspawn (void) WaypointSprite_Init(); - //if (g_domination) - // dom_init(); - GameLogInit(); // prepare everything // NOTE for matchid: // changing the logic generating it is okay. But: @@ -848,7 +846,7 @@ void spawnfunc_worldspawn (void) for(i = 0, j = 0; i < MapInfo_count; ++i) { if(MapInfo_Get_ByID(i)) - if not(MapInfo_Map_flags & (MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN)) + if not(MapInfo_Map_flags & MapInfo_ForbiddenFlags()) { if(mod(i, 2)) col = "^2"; @@ -948,9 +946,7 @@ void spawnfunc_worldspawn (void) modname = "MinstaGib"; // extra mutators that deserve to count as mod MUTATOR_CALLHOOK(SetModname); - // weird game types that deserve to count as mod - if(g_cts) - modname = "CTS"; + // save it for later modname = strzone(modname); @@ -1602,6 +1598,8 @@ void NextLevel() PlayerStats_Shutdown(); WeaponStats_Shutdown(); + Kill_Notification(NOTIF_ANY, world, MSG_CENTER, 0); // kill all centerprints now + if(autocvar_sv_eventlog) GameLogEcho(":gameover"); @@ -1684,20 +1682,8 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true tl = autocvar_timelimit; tl += autocvar_timelimit_overtime; cvar_set("timelimit", ftos(tl)); - string minutesPlural; - if (autocvar_timelimit_overtime == 1) - minutesPlural = " ^3minute"; - else - minutesPlural = " ^3minutes"; - - bcenterprint( - strcat( - "^3Now playing ^1OVERTIME^3!\n\n^3Added ^1", - ftos(autocvar_timelimit_overtime), - minutesPlural, - " to the game!" - ) - ); + + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime); } float GetWinningCode(float fraglimitreached, float equality) @@ -2203,9 +2189,9 @@ void CheckRules_World() { checkrules_suddendeathwarning = TRUE; if(g_race && !g_race_qualifying) - bcenterprint("^3Everyone, finish your lap! The race is over!"); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_RACE_FINISHLAP); else - bcenterprint("^3Now playing ^1OVERTIME^3!\n\n^3Keep fragging until we have a ^1winner^3!"); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_FRAG); } } else