- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints\r
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache\r
\r
- - EXPECT=0f809ceef84073f0926b08b6d4831f05\r
+ - EXPECT=458e9e611a757c745da05c85a37e576d\r
- HASH=$(${ENGINE} +timestamps 1 +exec serverbench.cfg\r
| tee /dev/stderr\r
| sed -e 's,^\[[^]]*\] ,,'\r
-Tue Apr 26 07:23:12 CEST 2022
+Sat May 28 07:23:08 CEST 2022
# Adam Říha, 2021
# Adam Říha, 2021
# fasdasd sdasd <transifexalternativeaccount@yopmail.com>, 2021
-# gamingforyou875 <gamingforyou875@gmail.com>, 2019
-# gamingforyou875 <gamingforyou875@gmail.com>, 2019
+# GamingasCZ <gamingforyou875@gmail.com>, 2019
+# GamingasCZ <gamingforyou875@gmail.com>, 2019
# Jan Kocka <kockahonza@gmail.com>, 2019
# Jiří Vrána <jirkacz199@gmail.com>, 2020-2021
# Martin Taibr <taibr.martin@gmail.com>, 2017
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
#: qcsrc/client/main.qc:1358
msgid "Your client version is outdated."
-msgstr "Votre version de client est obsolète."
+msgstr "La version de votre client est obsolète."
#: qcsrc/client/main.qc:1359
msgid "### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###"
"help slow GPUs"
msgstr ""
"Multiplicateur de taille d'écran ou de fenêtre, permet l'anticrénelage au-"
-"dessus de 1x, peut aider à ralentir les GPUs en-dessous de 1x"
+"dessus de 1x, en-dessous de 1x cela peut aider les petits GPUs"
#: qcsrc/menu/xonotic/dialog_settings_video.qc:90
msgid "Anisotropy:"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n == 1 ? 0 : n == 2 ? 1 : 2);\n"
+"Plural-Forms: nplurals=6; plural=n == 0 ? 0 : n == 1 ? 1 : (n % 100 == 2 || "
+"n % 100 == 22 || n % 100 == 42 || n % 100 == 62 || n % 100 == 82) || n % "
+"1000 == 0 && (n % 100000 >= 1000 && n % 100000 <= 20000 || n % 100000 == "
+"40000 || n % 100000 == 60000 || n % 100000 == 80000) || n != 0 && n % "
+"1000000 == 100000 ? 2 : (n % 100 == 3 || n % 100 == 23 || n % 100 == 43 || n "
+"% 100 == 63 || n % 100 == 83) ? 3 : n != 1 && (n % 100 == 1 || n % 100 == 21 "
+"|| n % 100 == 41 || n % 100 == 61 || n % 100 == 81) ? 4 : 5;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
#: qcsrc/client/announcer.qc:45
msgid "vs"
"^F2^COUNT^BG until weapon change...\n"
"Next weapon: ^F1%s"
msgstr ""
-"^F2^CONTAGEM^BG até a mudança de arma...\n"
+"^F2^COUNT^BG até a mudança de arma...\n"
"Próxima arma: ^F1%s"
#: qcsrc/common/notifications/all.inc:719
# Abdurrahman AKKUŞ <a.rahmanakkus@hotmail.com>, 2019
# Ahmet, 2022
# Ahmet, 2022
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
# Çağlar Turalı <caglarturali@gmail.com>, 2018
# Demiray Muhterem <mdemiray@msn.com>, 2018
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
# Gokdeniz.Kucukali, 2021
# Gokdeniz.Kucukali, 2021
# ibra kap <ibrakap@gmail.com>, 2019
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
msgid ""
msgstr ""
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-17 07:22+0200\n"
"PO-Revision-Date: 2013-09-12 16:53+0000\n"
-"Last-Translator: Big Brother <tanakinci2002@gmail.com>, 2021\n"
+"Last-Translator: Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021\n"
"Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
"language/tr/)\n"
"Language: tr\n"
// ====================
set g_cts 0 "CTS: complete the stage"
set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
-set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible"
+set g_cts_finish_kill_delay 2 "kill player this many seconds after stage completion to prevent cheating by starting out with more speed than otherwise possible; set it to 0 to not kill or to -1 to kill instantly"
set g_cts_send_rankings_cnt 15 "send this number of map records to clients"
set g_cts_removeprojectiles 0 "remove projectiles when the player dies, to prevent using weapons earlier in the stage than intended"
}
bool prev_inround;
+float prev_starttime;
+float prev_roundstarttime;
void Announcer_Countdown(entity this)
{
float starttime = STAT(GAMESTARTTIME);
float countdown = (inround ? roundstarttime - time : starttime - time);
float countdown_rounded = floor(0.5 + countdown);
+ if (starttime != prev_starttime || roundstarttime != prev_roundstarttime || prev_inround != inround)
+ this.skin = 0; // restart centerprint countdown
+
if(countdown <= 0) // countdown has finished, starttime is now
{
Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN);
if(inround)
{
if(!prev_inround) Announcer_ClearTitle(); // clear title if we just started the match
- Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, STAT(ROUNDS_PLAYED) + 1, countdown_rounded);
+ if (!this.skin) // first tic
+ Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, STAT(ROUNDS_PLAYED) + 1, countdown_rounded);
Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded);
if(annce_num != NULL)
Local_Notification(MSG_ANNCE, annce_num);
}
else
{
- Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_GAMESTART, countdown_rounded);
+ if (!this.skin) // first tic
+ Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_GAMESTART, countdown_rounded);
Notification annce_num = Announcer_PickNumber(CNT_GAMESTART, countdown_rounded);
if(!roundstarttime && annce_num != NULL) // Don't announce game start in round based modes
Local_Notification(MSG_ANNCE, annce_num);
this.nextthink = (starttime - (countdown - 1));
}
+ // Don't call centerprint countdown in the remaining tics, it will continue automatically.
+ // It's an optimization but also fixes ^COUNT shown in the last tic because of high slowmo values (15+).
+ // Hopefully it fixes ^COUNT occasionally shown in online servers, probably due to lags.
+ this.skin = 1; // recycled field
}
prev_inround = inround;
+ prev_starttime = starttime;
+ prev_roundstarttime = roundstarttime;
}
/**
startTime = roundstarttime;
if(intermission)
{
+ Announcer_ClearTitle();
if(announcer_countdown)
{
centerprint_Kill(ORDINAL(CPID_ROUND));
void Announcer()
{
+ // announcer code sets gametype name as centerprint title
+ if(!gametype)
+ return;
Announcer_Gamestart();
Announcer_Time();
}
if(n > maxclients)
return SHOTTYPE_HITWORLD;
t = entcs_GetTeam(n - 1);
- if(teamplay)
- if(t == myteam)
- return SHOTTYPE_HITTEAM;
+ if(teamplay && t == myteam)
+ return SHOTTYPE_HITTEAM;
if(t == NUM_SPECTATOR)
return SHOTTYPE_HITWORLD;
return SHOTTYPE_HITENEMY;
if (centerprint_title_left != "" && align == 0.5) // Center line at the main word (for duels)
pos.x += (stringwidth(centerprint_title_right, true, fontsize) - stringwidth(centerprint_title_left, true, fontsize)) / 2;
- drawcolorcodedstring(pos, centerprint_title, fontsize, 1, DRAWFLAG_NORMAL);
+ drawcolorcodedstring(pos, centerprint_title, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
if (autocvar_hud_panel_centerprint_flip)
pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING;
else
pos.y += fontsize.y + (hud_fontsize.y * CENTERPRINT_TITLE_SPACING);
- drawfill(pos, vec2(width, 1), '1 1 1', 1, DRAWFLAG_NORMAL);
+ drawfill(pos, vec2(width, 1), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
if (autocvar_hud_panel_centerprint_flip)
pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING;
// print information about respawn status
float respawn_time = STAT(RESPAWN_TIME);
- if(!intermission)
- if(respawn_time)
+ if(!intermission && respawn_time)
{
if(respawn_time < 0)
{
string msg = MakeConsoleSafe(strreplace("\n", "\\n", welcome_msg));
welcomedialog_args = strcat(welcomedialog_args, " WELCOME \"", msg, "\"");
localcmd("\nmenu_cmd directmenu Welcome ", welcomedialog_args, "\n");
+ if (intermission) // close it after it's been initialized so it can still be opened manually
+ localcmd("\ntogglemenu 0\n");
}
else
centerprint_Add(ORDINAL(CPID_MOTD), strcat(hostname, "\n\n\n", welcome_msg), -1, 0);
Hud_Dynamic_Frame();
if(!intermission)
- if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
{
- drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
- }
- else if(STAT(FROZEN))
- {
- vector col = '0.25 0.90 1';
- float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
- float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
- if(col_fade)
- col += vec3(col_fade, -col_fade, -col_fade);
- drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
+ if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
+ {
+ drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
+ }
+ else if(STAT(FROZEN))
+ {
+ vector col = '0.25 0.90 1';
+ float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
+ float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
+ if(col_fade)
+ col += vec3(col_fade, -col_fade, -col_fade);
+ drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
+ }
}
HUD_Scale_Enable();
if(!intermission)
- if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
- {
- vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
- DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
- drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
- }
- else if(STAT(CAPTURE_PROGRESS))
- {
- DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
- drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
- }
- else if(STAT(REVIVE_PROGRESS))
{
- DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
- drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+ if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
+ {
+ vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
+ DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+ }
+ else if(STAT(CAPTURE_PROGRESS))
+ {
+ DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+ }
+ else if(STAT(REVIVE_PROGRESS))
+ {
+ DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+ }
}
HUD_Scale_Disable();
if(autocvar_r_letterbox == 0)
+ {
if(autocvar_viewsize < 120)
{
if(!MUTATOR_CALLHOOK(DrawScoreboardAccuracy))
HUD_Main();
HUD_Scale_Disable();
}
+ }
// crosshair goes VERY LAST
UpdateDamage();
TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
- if(ent.cnt == 1 || autocvar_g_campaign) // this was the second round
+ if(ent.cnt == 1 || autocvar_g_campaign) // this was the second round or the only round in campaign
{
status = WINNING_YES;
}
MUTATOR_HOOKFUNCTION(as, ReadyRestart_Deny)
{
// readyrestart not supported (yet)
+ // it's supported only in campaign mode (single round mode), since campaign requires it
+ if (autocvar_g_campaign)
+ return false;
return true;
}
{
FOREACH_CLIENT(true, {
CS(it).killcount = 0;
- if (!INGAME(it) && IS_BOT_CLIENT(it))
- {
- it.team = -1;
- INGAME_STATUS_SET(it, INGAME_STATUS_JOINED);
- }
- if (INGAME(it))
+ if (INGAME(it) || IS_BOT_CLIENT(it))
{
TRANSMUTE(Player, it);
INGAME_STATUS_SET(it, INGAME_STATUS_JOINED);
{
float latency = max(0, CS(p).latency_sum / CS(p).latency_cnt);
if(latency)
- PlayerStats_GameReport_Event_Player(p, PLAYERSTATS_AVGLATENCY, latency);
+ {
+ // if previous average latency exists (player disconnected and reconnected)
+ // make the average of previous and current average latency
+ float prev_latency = PlayerStats_GameReport_Event_Player(p, PLAYERSTATS_AVGLATENCY, 0);
+ float new_latency = !prev_latency ? latency : (prev_latency + latency) / 2;
+ PlayerStats_GameReport_Event_Player(p, PLAYERSTATS_AVGLATENCY, -prev_latency + new_latency);
+ }
}
db_put(PS_GR_OUT_DB, sprintf("%s:_ranked", p.playerstats_id), ftos(CS_CVAR(p).cvar_cl_allow_uidranking));
* i: player index
* n: nickname of the player (optional)
* t: team ID
+ * r: player ranking enabled / disabled
* e: followed by an event name, a space, and the event count/score
* event names can be:
* alivetime: total playing time of the player
head = findradius(this.origin, WEP_CVAR(minelayer, proximityradius));
while(head)
{
- if(IS_PLAYER(head) && !IS_DEAD(head) && !STAT(FROZEN, head))
+ if(IS_PLAYER(head) && !IS_DEAD(head) && !STAT(FROZEN, head) && !IS_INDEPENDENT_PLAYER(head))
if(head != this.realowner && DIFF_TEAM(head, this.realowner)) // don't trigger for team mates
if(!this.mine_time)
{
void XonoticWelcomeDialog_draw(entity me)
{
SUPER(XonoticWelcomeDialog).draw(me);
+
+ if (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
+ me.close(me);
+
if(me.serverinfo_MOTD == "" && gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
{
// if serverinfo_MOTD is empty while connected it means we are connected to an old server
else bot_pants = ftos(floor(random() * 15));
if (teamplay && !(autocvar_bot_vs_human && AvailableTeams() == 2))
+ {
this.bot_forced_team = stof(argv(5));
+ if (!Team_IsValidIndex(this.bot_forced_team))
+ this.bot_forced_team = 0;
+ }
else
this.bot_forced_team = 0;
bot_setclientfields(this);
}
- if (teamplay && Team_IsValidIndex(this.bot_forced_team))
- {
- SetPlayerTeam(this, this.bot_forced_team, TEAM_CHANGE_MANUAL);
- }
- else
- {
- this.bot_forced_team = 0;
- TeamBalance_JoinBestTeam(this);
- }
-
havocbot_setupbot(this);
}
// spectators in the scoreboard and never go away. This issue happens at time 2 if map is changed
// with the gotomap command, minplayers is > 1 and human clients join as players very soon
// either intentionally or automatically (sv_spectate 0)
+ // A working workaround for this bug was implemented in commit fbd145044, see entcs_attach
if (time < 2.5)
{
currentbots = -1;
PlayerState_attach(this);
accuracy_resend(this);
+ if (teamplay && this.bot_forced_team)
+ SetPlayerTeam(this, this.bot_forced_team, TEAM_CHANGE_MANUAL);
+
if (this.team < 0)
TeamBalance_JoinBestTeam(this);
/** Called when a client spawns in the server */
void PutClientInServer(entity this)
{
- if (IS_BOT_CLIENT(this)) {
- TRANSMUTE(Player, this);
- } else if (IS_REAL_CLIENT(this)) {
+ if (IS_REAL_CLIENT(this)) {
msg_entity = this;
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, this);
}
}
+ if (IS_BOT_CLIENT(this) && !CS(this).autojoin_checked)
+ {
+ CS(this).autojoin_checked = true;
+ TRANSMUTE(Player, this);
+ PutClientInServer(this);
+ return;
+ }
+
if (this.flags & FL_JUMPRELEASED) {
if (PHYS_INPUT_BUTTON_JUMP(this) && (joinAllowed(this) || time < CS(this).jointime + MIN_SPEC_TIME)) {
this.flags &= ~FL_JUMPRELEASED;
void ReadyRestart(bool forceWarmupEnd)
{
- if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing) localcmd("restart\n");
+ if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing)
+ {
+ // NOTE: ReadyRestart support is mandatory in campaign
+ if (autocvar_g_campaign)
+ error("ReadyRestart must be supported in campaign mode!");
+ localcmd("restart\n"); // if ReadyRestart is denied, restart the server
+ }
else localcmd("\nsv_hook_readyrestart\n");
if(forceWarmupEnd || autocvar_g_campaign)
#include "gamelog.qh"
-
+#include <server/intermission.qh> // GetGametype(), GetMapname()
+#include <server/weapons/tracing.qh> // autocvar_g_norecoil
+#include <server/world.qh> // matchid
#include <server/main.qh>
string GameLog_ProcessIP(string s)
void GameLogInit()
{
- logfile_open = false;
- // will be opened later
+ GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", matchid));
+ string s = ":gameinfo:mutators:LIST";
+
+ MUTATOR_CALLHOOK(BuildMutatorsString, s);
+ s = M_ARGV(0, string);
+
+ // initialiation stuff, not good in the mutator system
+ if(!autocvar_g_use_ammunition)
+ s = strcat(s, ":no_use_ammunition");
+
+ // initialiation stuff, not good in the mutator system
+ if(autocvar_g_pickup_items == 0)
+ s = strcat(s, ":no_pickup_items");
+ if(autocvar_g_pickup_items > 0)
+ s = strcat(s, ":pickup_items");
+
+ // initialiation stuff, not good in the mutator system
+ if(autocvar_g_weaponarena != "0")
+ s = strcat(s, ":", autocvar_g_weaponarena, " arena");
+
+ // TODO to mutator system
+ if(autocvar_g_norecoil)
+ s = strcat(s, ":norecoil");
+
+ GameLogEcho(s);
+ GameLogEcho(":gameinfo:end");
}
void GameLogClose()
bool autocvar_sv_eventlog_files_timestamps;
bool autocvar_sv_eventlog_ipv6_delimiter = false;
-bool logfile_open;
+bool logfile_open = false;
float logfile;
string GameLog_ProcessIP(string s);
// support skinned models for powerups
this.skin = def.m_skin;
- this.glowmod = def.m_color;
setsize (this, this.pos1 = def.m_mins, this.pos2 = def.m_maxs);
if(Item_IsLoot(this))
this.gravity = 1;
+ else
+ this.glowmod = def.m_color;
if(def.instanceOfWeaponPickup)
{
/**/
MUTATOR_HOOKABLE(ChatMessageTo, EV_ChatMessageTo);
-/** return true to just restart the match, for modes that don't support readyrestart */
+/**
+ * return true to restart the server instead of restarting the match, for modes that don't support readyrestart.
+ * NOTE: ReadyRestart support is mandatory in campaign
+ */
MUTATOR_HOOKABLE(ReadyRestart_Deny, EV_NO_ARGS);
/** called when a fusion reactor is validating its target */
{
CS(e).race_completed = 1;
MAKE_INDEPENDENT_PLAYER(e);
+ if(e.bot_attack)
+ IL_REMOVE(g_bot_targets, e);
+ e.bot_attack = false;
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_FINISHED, e.netname);
ClientData_Touch(e);
}
* Initialize the scores info for the given number of teams.
* Set all labels right before this call.
*/
-void ScoreInfo_Init(float teams);
+void ScoreInfo_Init(int teams);
/**
* Clear ALL scores (for ready-restart).
if(!this.owner)
this.glowmod = wpn.wpcolor;
+ else
+ this.glowmod = colormapPaletteColor(this.owner.clientcolors & 0x0F, true) * 2;
GameItem def = wpn.m_pickup;
_StartItem(
wep.owner = wep.enemy = own;
wep.flags |= FL_TOSSED;
wep.colormap = own.colormap;
- wep.glowmod = weaponentity_glowmod(info, own, own.clientcolors, own.(weaponentity));
+ // wep.glowmod will be set in weapon_defaultspawnfunc
navigation_dynamicgoal_init(wep, false);
W_DropEvent(wr_drop,own,wpn,wep,weaponentity);
#include <server/damage.qh>
#include <server/gamelog.qh>
#include <server/hook.qh>
-#include <server/intermission.qh>
#include <server/ipban.qh>
#include <server/items/items.qh>
#include <server/main.qh>
#include <server/scores_rules.qh>
#include <server/spawnpoints.qh>
#include <server/teamplay.qh>
-#include <server/weapons/common.qh>
#include <server/weapons/weaponstats.qh>
const float LATENCY_THINKRATE = 10;
WaypointSprite_Init();
- GameLogInit(); // prepare everything
// NOTE for matchid:
// changing the logic generating it is okay. But:
// it HAS to stay <= 64 chars
// character set: ASCII 33-126 without the following characters: : ; ' " \ $
- if(autocvar_sv_eventlog)
- {
- string num = strftime_s(); // strftime(false, "%s") isn't reliable, see strftime_s description
- string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), num, floor(random() * 1000000));
- matchid = strzone(s);
-
- GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
- s = ":gameinfo:mutators:LIST";
-
- MUTATOR_CALLHOOK(BuildMutatorsString, s);
- s = M_ARGV(0, string);
-
- // initialiation stuff, not good in the mutator system
- if(!autocvar_g_use_ammunition)
- s = strcat(s, ":no_use_ammunition");
-
- // initialiation stuff, not good in the mutator system
- if(autocvar_g_pickup_items == 0)
- s = strcat(s, ":no_pickup_items");
- if(autocvar_g_pickup_items > 0)
- s = strcat(s, ":pickup_items");
+ // strftime(false, "%s") isn't reliable, see strftime_s description
+ matchid = strzone(sprintf("%d.%s.%06d", autocvar_sv_eventlog_files_counter, strftime_s(), random() * 1000000));
- // initialiation stuff, not good in the mutator system
- if(autocvar_g_weaponarena != "0")
- s = strcat(s, ":", autocvar_g_weaponarena, " arena");
-
- // TODO to mutator system
- if(autocvar_g_norecoil)
- s = strcat(s, ":norecoil");
-
- GameLogEcho(s);
- GameLogEcho(":gameinfo:end");
- }
- else
- matchid = strzone(ftos(random()));
+ if(autocvar_sv_eventlog)
+ GameLogInit(); // requires matchid to be set
cvar_set("nextmap", "");