BADCVAR("g_ctf_flag_glowtrails");
BADCVAR("g_ctf_dynamiclights");
BADCVAR("g_ctf_flag_pickup_verbosename");
+ BADCVAR("g_ctf_flagcarrier_auto_helpme_damage");
BADPRESUFFIX("g_ctf_flag_", "_model");
BADPRESUFFIX("g_ctf_flag_", "_skin");
BADCVAR("g_domination_point_leadlimit");
BADCVAR("sv_minigames");
BADCVAR("sv_namechangetimer");
BADCVAR("sv_precacheplayermodels");
+ BADCVAR("sv_qcphysics");
BADCVAR("sv_radio");
BADCVAR("sv_stepheight");
BADCVAR("sv_timeout");
BADCVAR("g_physics_clientselect");
BADCVAR("g_pinata");
BADCVAR("g_powerups");
+ BADCVAR("g_powerups_drop_ondeath");
BADCVAR("g_player_brightness");
BADCVAR("g_rocket_flying");
BADCVAR("g_rocket_flying_disabledelays");
BADCVAR("sv_maxrate");
BADCVAR("sv_motd");
BADCVAR("sv_public");
- BADCVAR("sv_ready_restart");
BADCVAR("sv_showfps");
BADCVAR("sv_status_privacy");
BADCVAR("sv_taunt");
{
server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
+ if (autocvar_sv_termsofservice_url && autocvar_sv_termsofservice_url != "")
+ {
+ strcpy(sv_termsofservice_url_escaped, strreplace(":", "|", autocvar_sv_termsofservice_url));
+ }
+ else
+ {
+ strcpy(sv_termsofservice_url_escaped, "INVALID");
+ }
+
bool wantrestart = false;
{
if (!server_is_dedicated)
if(autocvar_g_norecoil)
s = strcat(s, ":norecoil");
- // TODO to mutator system
- if(autocvar_g_powerups == 0)
- s = strcat(s, ":no_powerups");
- if(autocvar_g_powerups > 0)
- s = strcat(s, ":powerups");
-
GameLogEcho(s);
GameLogEcho(":gameinfo:end");
}
MapInfo_Enumerate();
MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1);
- if(fexists(strcat("scripts/", mapname, ".arena")))
- cvar_settemp("sv_q3acompat_machineshotgunswap", "1");
-
- if(fexists(strcat("scripts/", mapname, ".defi")))
- cvar_settemp("sv_q3defragcompat", "1");
+ q3compat = BITSET(q3compat, Q3COMPAT_ARENA, fexists(strcat("scripts/", mapname, ".arena")));
+ q3compat = BITSET(q3compat, Q3COMPAT_DEFI, fexists(strcat("scripts/", mapname, ".defi")));
if(whichpack(strcat("maps/", mapname, ".cfg")) != "")
{
FOREACH_CLIENT(IS_REAL_CLIENT(it) || (IS_BOT_CLIENT(it) && autocvar_sv_logscores_bots), {
s = strcat(":player:see-labels:", GetPlayerScoreString(it, 0), ":");
s = strcat(s, ftos(rint(time - CS(it).jointime)), ":");
- if(IS_PLAYER(it) || MUTATOR_CALLHOOK(GetPlayerStatus, it))
+ if(IS_PLAYER(it) || INGAME_JOINED(it))
s = strcat(s, ftos(it.team), ":");
else
s = strcat(s, "spectator:");
*/
void NextLevel()
{
+ cvar_set("_endmatch", "0");
game_stopped = true;
intermission_running = true; // game over
GameLogClose();
- FOREACH_CLIENT(IS_PLAYER(it), {
+ int winner_team = 0;
+ FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), {
FixIntermissionClient(it);
if(it.winning)
- bprint(playername(it.netname, it.team, false), " ^7wins.\n");
+ {
+ if (teamplay && !winner_team)
+ {
+ winner_team = it.team;
+ bprint(Team_ColorCode(winner_team), Team_ColorName_Upper(winner_team), "^7 team wins the match\n");
+ }
+ bprint(playername(it.netname, it.team, false), " ^7wins\n");
+ }
});
target_music_kill();
if(!checkrules_suddendeathend)
{
if(autocvar_g_campaign)
+ {
checkrules_suddendeathend = time; // no suddendeath in campaign
+ }
else
+ {
checkrules_suddendeathend = time + 60 * autocvar_timelimit_suddendeath;
+ overtimes = -1;
+ }
if(g_race && !g_race_qualifying)
race_StartCompleting();
}
void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
{
++checkrules_overtimesadded;
+ overtimes = checkrules_overtimesadded;
//add one more overtime by simply extending the timelimit
cvar_set("timelimit", ftos(autocvar_timelimit + autocvar_timelimit_overtime));
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime * 60);
// set the .winning flag for exactly those players with a given field value
void SetWinners(.float field, float value)
{
- FOREACH_CLIENT(IS_PLAYER(it), { it.winning = (it.(field) == value); });
+ FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), { it.winning = (it.(field) == value); });
}
// set the .winning flag for those players with a given field value
void AddWinners(.float field, float value)
{
- FOREACH_CLIENT(IS_PLAYER(it), {
+ FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), {
if(it.(field) == value)
it.winning = 1;
});
// clear the .winning flags
void ClearWinners()
{
- FOREACH_CLIENT(IS_PLAYER(it), { it.winning = 0; });
+ FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), { it.winning = 0; });
}
int fragsleft_last;
leadlimit = 0; // no leadlimit for now
}
- if(timelimit > 0)
- {
- timelimit += game_starttime;
- }
- else if (timelimit < 0)
+ if (autocvar__endmatch || timelimit < 0)
{
// endmatch
NextLevel();
return;
}
+ if(timelimit > 0)
+ timelimit += game_starttime;
+
float wantovertime;
wantovertime = 0;
if(readyplayers || playerswithlaps >= 2)
{
checkrules_suddendeathend = 0;
- ReadyRestart(); // go to race
+ ReadyRestart(true); // go to race
return;
}
else
}
bool autocvar_sv_gameplayfix_multiplethinksperframe = true;
-void RunThink(entity this)
+void RunThink(entity this, float dt)
{
// don't let things stay in the past.
// it is possible to start that way by a trigger with a local time.
- if(this.nextthink <= 0 || this.nextthink > time + frametime)
+ if(this.nextthink <= 0 || this.nextthink > time + dt)
return;
float oldtime = time; // do we need to save this?
// we don't want to loop in that case, so exit if the new nextthink is
// <= the time the qc was told, also exit if it is past the end of the
// frame
- if(this.nextthink <= time || this.nextthink > oldtime + frametime || !autocvar_sv_gameplayfix_multiplethinksperframe)
+ if(this.nextthink <= time || this.nextthink > oldtime + dt || !autocvar_sv_gameplayfix_multiplethinksperframe)
break;
}
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);
+ if (getthink(it) && it.nextthink > 0 && it.nextthink <= time + PHYS_INPUT_TIMELENGTH)
+ RunThink(it, PHYS_INPUT_TIMELENGTH);
}
});
STAT(TYPEHIT_TIME, it) = time;
} else if (e.killsound) {
STAT(KILL_TIME, it) = time;
- } else if (e.damage_dealt) {
+ } else if (e.hitsound_damage_dealt) {
STAT(HIT_TIME, it) = time;
- STAT(DAMAGE_DEALT_TOTAL, it) += ceil(e.damage_dealt);
+ // NOTE: this is not accurate as client code doesn't need so much accuracy for its purposes
+ STAT(HITSOUND_DAMAGE_DEALT_TOTAL, it) += ceil(e.hitsound_damage_dealt);
}
});
// add 1 frametime because after this, engine SV_Physics
float altime = time + frametime * (1 + autocvar_g_antilag_nudge);
FOREACH_CLIENT(true, {
it.typehitsound = false;
- it.damage_dealt = 0;
+ it.hitsound_damage_dealt = 0;
it.killsound = false;
antilag_record(it, CS(it), altime);
});
WeaponStats_Shutdown();
MapInfo_Shutdown();
+
+ strfree(sv_termsofservice_url_escaped);
}
else if(world_initialized == 0)
{