]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'bones_was_here/xonstat_https' into 'master'
authorterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 18:03:11 +0000 (18:03 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 2 Jan 2022 18:03:11 +0000 (18:03 +0000)
Use https for xonstat submissions

See merge request xonotic/xonotic-data.pk3dir!953

33 files changed:
.tx/merge-base
commands.cfg
common.ca.po
common.es.po
common.ja_JP.po
common.pt_BR.po
common.ru.po
languages.txt
qcsrc/client/hud/panel/timer.qc
qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/playerstats.qc
qcsrc/common/playerstats.qh
qcsrc/menu/item/button.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/cmd.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/main.qc
qcsrc/server/round_handler.qc
qcsrc/server/teamplay.qc
qcsrc/server/teamplay.qh
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/accuracy.qh
qcsrc/server/world.qc
qcsrc/server/world.qh
xonotic-server.cfg

index 2814404d7a543f6d32b4fe635fa7451e89eecb8c..07e3ff7e47d03aad1b7dfdce50cc64165f79cd2a 100644 (file)
@@ -1 +1 @@
-Fri Dec  3 07:23:13 CET 2021
+Wed Dec 29 07:23:06 CET 2021
index 60ffbced2ba90c275e2ea8b0ce0a1a673132d101..a6162badf4037b12ecdc6a15bd90b55b8e3e44d2 100644 (file)
@@ -229,6 +229,7 @@ alias nospectators         "qc_cmd_sv     nospectators         ${* ?}" // Automa
 alias printstats           "qc_cmd_sv     printstats           ${* ?}" // Dump eventlog player stats and other score information
 alias radarmap             "qc_cmd_sv     radarmap             ${* ?}" // Generate a radar image of the map
 alias reducematchtime      "qc_cmd_sv     reducematchtime      ${* ?}" // Decrease the timelimit value incrementally
+alias resetmatch           "qc_cmd_sv     resetmatch           ${* ?}" // Soft restart the map
 alias setbots              "qc_cmd_sv     setbots              ${* ?}" // Adjust how many bots are in the match
 alias shuffleteams         "qc_cmd_sv     shuffleteams         ${* ?}" // Randomly move players to different teams
 alias stuffto              "qc_cmd_sv     stuffto              ${* ?}" // Send a command to be executed on a client
@@ -307,6 +308,7 @@ set sv_vote_command_restriction_endmatch "0"
 set sv_vote_command_restriction_reducematchtime "0"
 set sv_vote_command_restriction_extendmatchtime "0"
 set sv_vote_command_restriction_allready "0"
+set sv_vote_command_restriction_resetmatch "0"
 set sv_vote_command_restriction_kick "1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" // enough space for ban reason
 set sv_vote_command_restriction_kickban "1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" // enough space for ban reason
 set sv_vote_command_restriction_cointoss "0"
@@ -327,7 +329,7 @@ set sv_vote_command_help_gotomap "\nUsage:^3 vcall gotomap mapname\n^7  Where 'm
 // =================================
 set sv_vote_call 1 "Allow users to call a vote for the commands in sv_vote_commands"
 set sv_vote_change 1 "Allow voters to change their mind after already voting"
-set sv_vote_commands "restart fraglimit gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams bots nobots" "these commands can be voted by players or used directly by masters (vdo) in addition to sv_vote_master_commands"
+set sv_vote_commands "restart fraglimit gotomap nextmap endmatch reducematchtime extendmatchtime allready resetmatch kick cointoss movetoauto shuffleteams bots nobots" "these commands can be voted by players or used directly by masters (vdo) in addition to sv_vote_master_commands"
 set sv_vote_only_commands ""
 set sv_vote_limit 160 "Maximum allowed length of a vote command"
 set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink movetospec" "Extra commands which vote masters can execute by themselves, along with the normal sv_vote_commands." // maybe add kickban here (but then sv_vote_master 0)
@@ -377,4 +379,4 @@ alias vdoend "vdo endmatch"
 //  rcon server commands
 // ======================
 rcon_secure 1
-set rcon_restricted_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams bots nobots movetored movetoblue movetoyellow movetopink movetospec kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\""
+set rcon_restricted_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready resetmatch kick cointoss movetoauto shuffleteams bots nobots movetored movetoblue movetoyellow movetopink movetospec kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\""
index ee6e12ad06a920f4a3a4e8a49c44105ea2968a44..498e840080d2e1b1ded00ef6d63e618526e14d77 100644 (file)
@@ -11,8 +11,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-11-28 07:22+0100\n"
-"PO-Revision-Date: 2021-11-28 06:22+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-12-12 19:37+0000\n"
+"Last-Translator: LegendGuard\n"
 "Language-Team: Catalan (http://www.transifex.com/team-xonotic/xonotic/"
 "language/ca/)\n"
 "Language: ca\n"
@@ -1308,7 +1308,7 @@ msgstr ""
 
 #: qcsrc/common/gamemodes/gamemode/duel/duel.qh:9
 msgid "Duel"
-msgstr ""
+msgstr "Duel"
 
 #: qcsrc/common/gamemodes/gamemode/duel/duel.qh:9
 msgid "Fight in a one versus one arena battle to decide the winner"
@@ -8526,7 +8526,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:58
 msgid "Only in Duel"
-msgstr ""
+msgstr "Només en Duel"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:59
 msgid "Only in team games"
@@ -8534,7 +8534,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:60
 msgid "In team games and Duel"
-msgstr ""
+msgstr "En jocs d'equip i Duel"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:64
 msgid "Body fading:"
index da6e9ee8e2893dacb82239299e947fe424761247..bb59e8c8693fe98c0ac318d27adfbed22013cfc1 100644 (file)
@@ -32,8 +32,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-11-28 07:22+0100\n"
-"PO-Revision-Date: 2021-11-28 06:22+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-12-12 19:11+0000\n"
+"Last-Translator: LegendGuard\n"
 "Language-Team: Spanish (http://www.transifex.com/team-xonotic/xonotic/"
 "language/es/)\n"
 "Language: es\n"
@@ -5982,7 +5982,7 @@ msgstr "Escala de fuente:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc:41
 msgid "Bold font scale:"
-msgstr ""
+msgstr "Escala de fuente en negrita:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh:6
 msgid "Centerprint Panel"
index 8ffc07e2e7b6e7d848caa12cb1da3167c26fbf4b..d7aae1bbc4889386d5c8e2b868cd8a710610510e 100644 (file)
@@ -15,8 +15,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-11-28 07:22+0100\n"
-"PO-Revision-Date: 2021-11-28 06:22+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-12-12 19:35+0000\n"
+"Last-Translator: LegendGuard\n"
 "Language-Team: Japanese (Japan) (http://www.transifex.com/team-xonotic/"
 "xonotic/language/ja_JP/)\n"
 "Language: ja_JP\n"
@@ -1560,7 +1560,7 @@ msgstr "よくやった! 「次のレベル」をクリックして続行する"
 #: qcsrc/common/minigames/minigame/ps.qc:498
 #: qcsrc/common/minigames/minigame/ttt.qc:329
 msgid "You are spectating"
-msgstr ""
+msgstr "観戦中"
 
 #: qcsrc/common/minigames/minigame/bd.qc:1184
 msgid "Better luck next time!"
@@ -5896,7 +5896,7 @@ msgstr "フォントスケール:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc:41
 msgid "Bold font scale:"
-msgstr ""
+msgstr "太字フォントスケール:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh:6
 msgid "Centerprint Panel"
@@ -8657,6 +8657,8 @@ msgid ""
 "Warning: if enabled in team games your team's color may be the same as the "
 "enemy team"
 msgstr ""
+"警告:チームゲームで有効になっている場合、チームの色は敵チームと同じである可"
+"能性があります"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:57
 msgid "Except in team games"
@@ -8668,11 +8670,11 @@ msgstr "決闘でのみ"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:59
 msgid "Only in team games"
-msgstr ""
+msgstr "チームゲームのみ"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:60
 msgid "In team games and Duel"
-msgstr ""
+msgstr "チームゲームと決闘で"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_model.qc:64
 msgid "Body fading:"
@@ -9959,27 +9961,27 @@ msgstr "OMG"
 
 #: qcsrc/menu/xonotic/slider_particles.qc:15
 msgid "PARTQUAL^Low"
-msgstr ""
+msgstr "低い"
 
 #: qcsrc/menu/xonotic/slider_particles.qc:16
 msgid "PARTQUAL^Medium"
-msgstr ""
+msgstr ""
 
 #: qcsrc/menu/xonotic/slider_particles.qc:17
 msgid "PARTQUAL^Normal"
-msgstr ""
+msgstr "通常"
 
 #: qcsrc/menu/xonotic/slider_particles.qc:18
 msgid "PARTQUAL^High"
-msgstr ""
+msgstr "高い"
 
 #: qcsrc/menu/xonotic/slider_particles.qc:19
 msgid "PARTQUAL^Ultra"
-msgstr ""
+msgstr ""
 
 #: qcsrc/menu/xonotic/slider_particles.qc:20
 msgid "PARTQUAL^Ultimate"
-msgstr ""
+msgstr "究極"
 
 #: qcsrc/menu/xonotic/slider_picmip.qc:13
 msgid ""
@@ -9995,19 +9997,19 @@ msgstr "画面の解像度"
 
 #: qcsrc/menu/xonotic/slider_sbfadetime.qc:13
 msgid "FADESPEED^Slow"
-msgstr ""
+msgstr "遅い"
 
 #: qcsrc/menu/xonotic/slider_sbfadetime.qc:14
 msgid "FADESPEED^Normal"
-msgstr ""
+msgstr "通常"
 
 #: qcsrc/menu/xonotic/slider_sbfadetime.qc:15
 msgid "FADESPEED^Fast"
-msgstr ""
+msgstr "速い"
 
 #: qcsrc/menu/xonotic/slider_sbfadetime.qc:16
 msgid "FADESPEED^Instant"
-msgstr ""
+msgstr "瞬時"
 
 #: qcsrc/menu/xonotic/statslist.qc:29
 msgid "January"
index 8f43961cc235d9ec0b3d5e50568569159e0d3556..7abebc98bc398ac569237234fba653b04e9031f3 100644 (file)
@@ -9,14 +9,16 @@
 # NotThatPrivate Yes <henriqueferreira2009@gmail.com>, 2015
 # Ricardo Manuel da Cruz Coelho da Silva <ricardo.mccs@gmail.com>, 2015
 # Rui <xymarior@yandex.com>, 2018
+# yy0zz, 2021
+# yy0zz, 2021
 # zerowhy . <anymailz@tutanota.com>, 2021
 msgid ""
 msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-11-28 07:22+0100\n"
-"PO-Revision-Date: 2021-12-02 15:37+0000\n"
-"Last-Translator: Jean Trindade Pereira <jean_trindade2@hotmail.com>\n"
+"PO-Revision-Date: 2021-12-27 13:05+0000\n"
+"Last-Translator: yy0zz\n"
 "Language-Team: Portuguese (Brazil) (http://www.transifex.com/team-xonotic/"
 "xonotic/language/pt_BR/)\n"
 "Language: pt_BR\n"
@@ -4539,7 +4541,7 @@ msgstr "MUTILAÇÃO! "
 #: qcsrc/common/notifications/all.qh:459
 #, c-format
 msgid "%s^K1 is a BERSERKER! %s^BG"
-msgstr "%s^K1 está FURIOSO! %s^BG"
+msgstr "%s^K1 é um BERSERKER! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:459
 #, c-format
@@ -4548,7 +4550,7 @@ msgstr "%s^K1 fez VINTE PONTUAÇÕES SEGUIDAS! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:459
 msgid "BERSERKER! "
-msgstr "FURIOSO!"
+msgstr "BERSERKER! "
 
 #: qcsrc/common/notifications/all.qh:460
 #, c-format
@@ -4576,7 +4578,7 @@ msgstr "%s^K1 desencadeou o ARMAGEDOM! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:461
 msgid "ARMAGEDDON! "
-msgstr "ARMAGEDDON! "
+msgstr "ARMAGEDOM! "
 
 #: qcsrc/common/notifications/all.qh:468
 #, c-format
@@ -5360,7 +5362,7 @@ msgstr "%d anos"
 #: qcsrc/lib/counting.qh:13
 #, c-format
 msgid "CI_FIR^%d year"
-msgstr "^%d ano"
+msgstr "%d ano"
 
 #: qcsrc/lib/counting.qh:14
 #, c-format
@@ -5375,177 +5377,177 @@ msgstr "%d anos"
 #: qcsrc/lib/counting.qh:16
 #, c-format
 msgid "CI_MUL^%d years"
-msgstr "^%d anos"
+msgstr "%d anos"
 
 #: qcsrc/lib/counting.qh:18
 #, c-format
 msgid "CI_DEC^%s weeks"
-msgstr "^%s semanas"
+msgstr "%s semanas"
 
 #: qcsrc/lib/counting.qh:21
 #, c-format
 msgid "CI_ZER^%d weeks"
-msgstr "^%d semanas"
+msgstr "%d semanas"
 
 #: qcsrc/lib/counting.qh:22
 #, c-format
 msgid "CI_FIR^%d week"
-msgstr "^%d semana"
+msgstr "%d semana"
 
 #: qcsrc/lib/counting.qh:23
 #, c-format
 msgid "CI_SEC^%d weeks"
-msgstr "^%d semanas"
+msgstr "%d semanas"
 
 #: qcsrc/lib/counting.qh:24
 #, c-format
 msgid "CI_THI^%d weeks"
-msgstr "^%d semanas"
+msgstr "%d semanas"
 
 #: qcsrc/lib/counting.qh:25
 #, c-format
 msgid "CI_MUL^%d weeks"
-msgstr "^%d semanas"
+msgstr "%d semanas"
 
 #: qcsrc/lib/counting.qh:27
 #, c-format
 msgid "CI_DEC^%s days"
-msgstr "^%s dias"
+msgstr "%s dias"
 
 #: qcsrc/lib/counting.qh:30
 #, c-format
 msgid "CI_ZER^%d days"
-msgstr "^%d dias"
+msgstr "%d dias"
 
 #: qcsrc/lib/counting.qh:31
 #, c-format
 msgid "CI_FIR^%d day"
-msgstr "^%d dia"
+msgstr "%d dia"
 
 #: qcsrc/lib/counting.qh:32
 #, c-format
 msgid "CI_SEC^%d days"
-msgstr "^%d dias"
+msgstr "%d dias"
 
 #: qcsrc/lib/counting.qh:33
 #, c-format
 msgid "CI_THI^%d days"
-msgstr "^%d dias"
+msgstr "%d dias"
 
 #: qcsrc/lib/counting.qh:34
 #, c-format
 msgid "CI_MUL^%d days"
-msgstr "^%d dias"
+msgstr "%d dias"
 
 #: qcsrc/lib/counting.qh:36
 #, c-format
 msgid "CI_DEC^%s hours"
-msgstr "^%s horas"
+msgstr "%s horas"
 
 #: qcsrc/lib/counting.qh:39
 #, c-format
 msgid "CI_ZER^%d hours"
-msgstr "^%d horas"
+msgstr "%d horas"
 
 #: qcsrc/lib/counting.qh:40
 #, c-format
 msgid "CI_FIR^%d hour"
-msgstr "^%d hora"
+msgstr "%d hora"
 
 #: qcsrc/lib/counting.qh:41
 #, c-format
 msgid "CI_SEC^%d hours"
-msgstr "^%d horas"
+msgstr "%d horas"
 
 #: qcsrc/lib/counting.qh:42
 #, c-format
 msgid "CI_THI^%d hours"
-msgstr "^%d horas"
+msgstr "%d horas"
 
 #: qcsrc/lib/counting.qh:43
 #, c-format
 msgid "CI_MUL^%d hours"
-msgstr "^%d horas"
+msgstr "%d horas"
 
 #: qcsrc/lib/counting.qh:46
 #, c-format
 msgid "CI_DEC^%s minutes"
-msgstr "^%s minutos"
+msgstr "%s minutos"
 
 #: qcsrc/lib/counting.qh:49
 #, c-format
 msgid "CI_ZER^%d minutes"
-msgstr "^%d minutos"
+msgstr "%d minutos"
 
 #: qcsrc/lib/counting.qh:50
 #, c-format
 msgid "CI_FIR^%d minute"
-msgstr "^%d minuto"
+msgstr "%d minuto"
 
 #: qcsrc/lib/counting.qh:51
 #, c-format
 msgid "CI_SEC^%d minutes"
-msgstr "^%d minutos"
+msgstr "%d minutos"
 
 #: qcsrc/lib/counting.qh:52
 #, c-format
 msgid "CI_THI^%d minutes"
-msgstr "^%d minutos"
+msgstr "%d minutos"
 
 #: qcsrc/lib/counting.qh:53
 #, c-format
 msgid "CI_MUL^%d minutes"
-msgstr "^%d minutos"
+msgstr "%d minutos"
 
 #: qcsrc/lib/counting.qh:55
 #, c-format
 msgid "CI_DEC^%s seconds"
-msgstr "^%s segundos"
+msgstr "%s segundos"
 
 #: qcsrc/lib/counting.qh:58
 #, c-format
 msgid "CI_ZER^%d seconds"
-msgstr "^%d segundos"
+msgstr "%d segundos"
 
 #: qcsrc/lib/counting.qh:59
 #, c-format
 msgid "CI_FIR^%d second"
-msgstr "^%d segundo"
+msgstr "%d segundo"
 
 #: qcsrc/lib/counting.qh:60
 #, c-format
 msgid "CI_SEC^%d seconds"
-msgstr "^%d segundos"
+msgstr "%d segundos"
 
 #: qcsrc/lib/counting.qh:61
 #, c-format
 msgid "CI_THI^%d seconds"
-msgstr "^%d segundos"
+msgstr "%d segundos"
 
 #: qcsrc/lib/counting.qh:62
 #, c-format
 msgid "CI_MUL^%d seconds"
-msgstr "^%d segundos"
+msgstr "%d segundos"
 
 #: qcsrc/lib/counting.qh:79
 #, c-format
 msgid "%dst"
-msgstr "%dst"
+msgstr "%dº"
 
 #: qcsrc/lib/counting.qh:80
 #, c-format
 msgid "%dnd"
-msgstr "%dnd"
+msgstr "%dº"
 
 #: qcsrc/lib/counting.qh:81
 #, c-format
 msgid "%drd"
-msgstr "%drd"
+msgstr "%dº"
 
 #: qcsrc/lib/counting.qh:85
 #, c-format
 msgid "%dth"
-msgstr "%dth"
+msgstr "%dº"
 
 #: qcsrc/lib/oo.qh:324
 msgid "No description"
index a0234497b55d3858e37c16a7758accd0faa2853c..c29fc8a7c1e7e83da9aafe59fb9eb3b9155e342f 100644 (file)
@@ -21,7 +21,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-11-28 07:22+0100\n"
-"PO-Revision-Date: 2021-12-02 02:07+0000\n"
+"PO-Revision-Date: 2021-12-28 15:49+0000\n"
 "Last-Translator: Andrei Stepanov <adem4ik@gmail.com>\n"
 "Language-Team: Russian (http://www.transifex.com/team-xonotic/xonotic/"
 "language/ru/)\n"
@@ -5957,7 +5957,7 @@ msgstr "Сведения о движке:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc:19
 msgid "Use an averaging algorithm for fps"
-msgstr "Исп. алгоритм усреднения для FPS"
+msgstr "Исп. алгоритм усреднения частоты кадров"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qh:6
 msgid "Engine Info Panel"
@@ -8583,7 +8583,7 @@ msgstr "Настройки режима игры"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:67
 msgid "Display capture times in Capture The Flag"
-msgstr "Отображать рекорды в режиме Захват Флага"
+msgstr "Отображать рекорды в режиме Захват флага"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:71
 msgid "Display name of flag stealer in Capture The Flag"
@@ -9046,7 +9046,7 @@ msgstr "Определённая пользователем привязка к
 #: qcsrc/menu/xonotic/dialog_settings_misc.qc:11
 #, c-format
 msgid "%d fps"
-msgstr "%d fps"
+msgstr "%d к/c"
 
 #: qcsrc/menu/xonotic/dialog_settings_misc.qc:12
 #, c-format
@@ -9374,7 +9374,7 @@ msgid ""
 "screen refresh rate"
 msgstr ""
 "Включить вертикальную синхронизацию для предотвращения разрыва кадров, это "
-"ограничит частоту кадров в секунду частотой обновления монитора"
+"ограничит частоту кадров частотой обновления монитора"
 
 #: qcsrc/menu/xonotic/dialog_settings_video.qc:67
 msgid "Flip view horizontally"
index ad2bffdc23a08f5d3f5b1a77585152486783adf1..6f7df341c9cc908feb827bb9a17303e0c3e0421a 100644 (file)
@@ -3,7 +3,7 @@ de    "German" "Deutsch" 100%
 de_CH "German (Switzerland)" "Deutsch (Schweiz)" 100%
 en    "English" "English" 100%
 en_AU "English (Australia)" "English (Australia)" 73%
-es    "Spanish" "Español" 99%
+es    "Spanish" "Español" 100%
 fr    "French" "Français" 100%
 ga    "Irish" "Irish" 31%
 it    "Italian" "Italiano" 100%
@@ -25,5 +25,5 @@ sr    "Serbian" "Српски" 62%
 uk    "Ukrainian" "Українська" 49%
 zh_CN "Chinese (China)" "中文" 60%
 zh_TW "Chinese (Taiwan)" "國語" 59%
-ja_JP "Japanese" "日本語" 99%
+ja_JP "Japanese" "日本語" 100%
 ko    "Korean" "한국의" 28%
index 0cdfefa7899af591aaf4f3ef3c567152d02e41ac..f1c4dcfe807b89e456ba230abc91e59bc7b276bf 100644 (file)
@@ -51,7 +51,7 @@ void HUD_Timer()
        {
                float warmup_timelimit = STAT(WARMUP_TIMELIMIT);
                if(warmup_timelimit > 0)
-                       warmup_timeleft = max(0, warmup_timelimit - time);
+                       warmup_timeleft = max(0, warmup_timelimit - time + STAT(GAMESTARTTIME));
                else if(warmup_timelimit == 0)
                        warmup_timeleft = timeleft;
                warmup_timeleft = ceil(warmup_timeleft);
index f5683051c4694151c9923d4e738cbacbacfd0006..5edfd5ff1863362ecaf53354431793598c11e228 100644 (file)
@@ -191,8 +191,6 @@ void assault_wall_think(entity this)
 // reset objectives, toggle spawnpoints, reset triggers, ...
 void assault_new_round(entity this)
 {
-       //bprint("ASSAULT: new round\n");
-
        // up round counter
        this.winning = this.winning + 1;
 
@@ -212,7 +210,8 @@ void assault_new_round(entity this)
 
        // reset the level with a countdown
        cvar_set("timelimit", ftos(ceil(time - AS_ROUND_DELAY - game_starttime) / 60));
-       ReadyRestart_force(); // sets game_starttime
+       bprint("Starting second round...\n");
+       ReadyRestart_force(true); // sets game_starttime
 }
 
 entity as_round;
@@ -251,7 +250,7 @@ int WinningCondition_Assault()
        {
                if(ent.winning) // round end has been triggered by attacking team
                {
-                       bprint("Assault: round completed.\n");
+                       bprint(Team_ColoredFullName(assault_attacker_team), " destroyed the objective in ", process_time(2, ceil(time - game_starttime)), "\n");
                        SetWinners(team, assault_attacker_team);
 
                        TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
index d40c04c0b658a63087c801a92d607bf20dd9493d..3d0c292617f9596d0c0ce3c68d9cf374e23de8e5 100644 (file)
@@ -33,42 +33,13 @@ void CA_count_alive_players()
        });
        FOREACH_CLIENT(IS_REAL_CLIENT(it),
        {
-               STAT(REDALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(
-                       1));
-               STAT(BLUEALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(2));
-               STAT(YELLOWALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(3));
-               STAT(PINKALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(4));
+               STAT(REDALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(1));
+               STAT(BLUEALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(2));
+               STAT(YELLOWALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(3));
+               STAT(PINKALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(4));
        });
 }
 
-int CA_GetWinnerTeam()
-{
-       int winner_team = 0;
-       if (Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(1)) >= 1)
-       {
-               winner_team = NUM_TEAM_1;
-       }
-       for (int i = 2; i <= NUM_TEAMS; ++i)
-       {
-               if (Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(i)) >= 1)
-               {
-                       if (winner_team != 0)
-                       {
-                               return 0;
-                       }
-                       winner_team = Team_IndexToTeam(i);
-               }
-       }
-       if (winner_team)
-       {
-               return winner_team;
-       }
-       return -1; // no player left
-}
-
 void nades_Clear(entity player);
 
 float CA_CheckWinner()
@@ -86,12 +57,10 @@ float CA_CheckWinner()
        }
 
        CA_count_alive_players();
-       if (Team_GetNumberOfAliveTeams() > 1)
-       {
+       int winner_team = Team_GetWinnerAliveTeam();
+       if (!winner_team)
                return 0;
-       }
 
-       int winner_team = CA_GetWinnerTeam();
        if(winner_team > 0)
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
index ca782cedbb87f04f3ee45fa1f6ad5eddb7519b80..80bbf6532a436011640e16ce6546f30172f8f090 100644 (file)
@@ -311,7 +311,7 @@ void Domination_count_controlpoints()
        total_control_points = 0;
        for (int i = 1; i <= NUM_TEAMS; ++i)
        {
-               Team_SetNumberOfControlPoints(Team_GetTeamFromIndex(i), 0);
+               Team_SetNumberOfOwnedItems(Team_GetTeamFromIndex(i), 0);
        }
        IL_EACH(g_dompoints, true,
        {
@@ -321,39 +321,12 @@ void Domination_count_controlpoints()
                        continue;
                }
                entity team_ = Entity_GetTeam(it.goalentity);
-               int num_control_points = Team_GetNumberOfControlPoints(team_);
+               int num_control_points = Team_GetNumberOfOwnedItems(team_);
                ++num_control_points;
-               Team_SetNumberOfControlPoints(team_, num_control_points);
+               Team_SetNumberOfOwnedItems(team_, num_control_points);
        });
 }
 
-int Domination_GetWinnerTeam()
-{
-       int winner_team = 0;
-       if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(1)) ==
-               total_control_points)
-       {
-               winner_team = NUM_TEAM_1;
-       }
-       for (int i = 2; i <= NUM_TEAMS; ++i)
-       {
-               if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(i)) ==
-                       total_control_points)
-               {
-                       if (winner_team != 0)
-                       {
-                               return 0;
-                       }
-                       winner_team = Team_IndexToTeam(i);
-               }
-       }
-       if (winner_team)
-       {
-               return winner_team;
-       }
-       return -1; // no control points left?
-}
-
 bool Domination_CheckWinner()
 {
        if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
@@ -367,11 +340,9 @@ bool Domination_CheckWinner()
        }
 
        Domination_count_controlpoints();
-
-       float winner_team = Domination_GetWinnerTeam();
-
-       if(winner_team == -1)
-               return false;
+       int winner_team = Team_GetWinnerTeam_WIthOwnedItems(total_control_points);
+       if (winner_team == -1)
+               return 0;
 
        if(winner_team > 0)
        {
@@ -379,11 +350,6 @@ bool Domination_CheckWinner()
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN));
                TeamScore_AddToTeam(winner_team, ST_DOM_CAPS, +1);
        }
-       else if(winner_team == -1)
-       {
-               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_ROUND_TIED);
-               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ROUND_TIED);
-       }
 
        game_stopped = true;
        round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
index 5712c82c980cab2cfa9345f72d284da0301fef6e..58fd90c897f15213ce6b686e9a5b402df00c19d6 100644 (file)
@@ -40,14 +40,10 @@ void freezetag_count_alive_players()
        });
        FOREACH_CLIENT(IS_REAL_CLIENT(it),
        {
-               STAT(REDALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(
-                       1));
-               STAT(BLUEALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(2));
-               STAT(YELLOWALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(3));
-               STAT(PINKALIVE, it) = Team_GetNumberOfAlivePlayers(
-                       Team_GetTeamFromIndex(4));
+               STAT(REDALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(1));
+               STAT(BLUEALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(2));
+               STAT(YELLOWALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(3));
+               STAT(PINKALIVE, it) = Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(4));
        });
 
        eliminatedPlayers.SendFlags |= 1;
@@ -87,31 +83,6 @@ bool freezetag_CheckTeams()
        return false;
 }
 
-int freezetag_getWinnerTeam()
-{
-       int winner_team = 0;
-       if (Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(1)) >= 1)
-       {
-               winner_team = NUM_TEAM_1;
-       }
-       for (int i = 2; i <= NUM_TEAMS; ++i)
-       {
-               if (Team_GetNumberOfAlivePlayers(Team_GetTeamFromIndex(i)) >= 1)
-               {
-                       if (winner_team != 0)
-                       {
-                               return 0;
-                       }
-                       winner_team = Team_IndexToTeam(i);
-               }
-       }
-       if (winner_team)
-       {
-               return winner_team;
-       }
-       return -1; // no player left
-}
-
 void nades_Clear(entity);
 void nades_GiveBonus(entity player, float score);
 
@@ -131,12 +102,10 @@ bool freezetag_CheckWinner()
                return true;
        }
 
-       if (Team_GetNumberOfAliveTeams() > 1)
-       {
+       int winner_team = Team_GetWinnerAliveTeam();
+       if (!winner_team)
                return false;
-       }
 
-       int winner_team = freezetag_getWinnerTeam();
        if(winner_team > 0)
        {
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN));
index 8f545955caefc20137883d1d15f9c066ec610eb5..37551c7f88981050c5bdc9a8f889253956ba05c1 100644 (file)
@@ -265,10 +265,10 @@ void lms_RemovePlayer(entity player)
                        });
                        GameRules_scoring_add(player, LMS_RANK, pl_cnt + 1);
                }
-               else
+               else if (player.lmsplayer)
                {
                        int min_forfeiter_rank = 665; // different from 666
-                       FOREACH_CLIENT(true, {
+                       FOREACH_CLIENT(it != player, {
                                // update rank of other players that were eliminated
                                if (it.frags == FRAGS_PLAYER_OUT_OF_GAME)
                                {
index db39a8a39513a3d80c97816ad3a2bf08d3c1cb94..c071be0e0e63108817b641c71402885dd2d92b67 100644 (file)
@@ -1126,7 +1126,7 @@ void Onslaught_count_generators()
        total_generators = 0;
        for (int i = 1; i <= NUM_TEAMS; ++i)
        {
-               Team_SetNumberOfControlPoints(Team_GetTeamFromIndex(i), 0);
+               Team_SetNumberOfOwnedItems(Team_GetTeamFromIndex(i), 0);
        }
        for(e = ons_worldgeneratorlist; e; e = e.ons_worldgeneratornext)
        {
@@ -1136,37 +1136,12 @@ void Onslaught_count_generators()
                        continue;
                }
                entity team_ = Entity_GetTeam(e);
-               int num_control_points = Team_GetNumberOfControlPoints(team_);
-               ++num_control_points;
-               Team_SetNumberOfControlPoints(team_, num_control_points);
+               int num_generators = Team_GetNumberOfOwnedItems(team_);
+               ++num_generators;
+               Team_SetNumberOfOwnedItems(team_, num_generators);
        }
 }
 
-int Onslaught_GetWinnerTeam()
-{
-       int winner_team = 0;
-       if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(1)) >= 1)
-       {
-               winner_team = NUM_TEAM_1;
-       }
-       for (int i = 2; i <= NUM_TEAMS; ++i)
-       {
-               if (Team_GetNumberOfControlPoints(Team_GetTeamFromIndex(i)) >= 1)
-               {
-                       if (winner_team != 0)
-                       {
-                               return 0;
-                       }
-                       winner_team = Team_IndexToTeam(i);
-               }
-       }
-       if (winner_team)
-       {
-               return winner_team;
-       }
-       return -1; // no generators left?
-}
-
 void nades_Clear(entity e);
 
 bool Onslaught_CheckWinner()
@@ -1213,13 +1188,9 @@ bool Onslaught_CheckWinner()
        else { wpforenemy_announced = false; ons_stalemate = false; }
 
        Onslaught_count_generators();
-
-       if (Team_GetNumberOfTeamsWithControlPoints() > 1)
-       {
+       int winner_team = Team_GetWinnerTeam_WIthOwnedItems(1);
+       if (!winner_team)
                return 0;
-       }
-
-       int winner_team = Onslaught_GetWinnerTeam();
 
        if(winner_team > 0)
        {
index c11efed8b78af9868d79c635bc0761fe483e7c62..e648d29538ce507d0f524b780bc941b5e4e6f09f 100644 (file)
@@ -21,6 +21,47 @@ void PlayerStats_Prematch()
        //foobar
 }
 
+// Deletes current playerstats DB, creates a new one and fully initializes it
+void PlayerStats_GameReport_Reset_All()
+{
+       strfree(PS_GR_OUT_TL);
+       strfree(PS_GR_OUT_PL);
+       strfree(PS_GR_OUT_EVL);
+
+       if (PS_GR_OUT_DB >= 0)
+               db_close(PS_GR_OUT_DB);
+       PlayerStats_GameReport_Init();
+       if(PS_GR_OUT_DB < 0)
+               return;
+
+       for (int i = 0; i < 16; i++)
+               if (teamscorekeepers[i])
+                       PlayerStats_GameReport_AddTeam(i + 1);
+       FOREACH_CLIENT(true, {
+               // NOTE Adding back a player we are applying any cl_allow_uidtracking change
+               // usually only possible by reconnecting to the server
+               strfree(it.playerstats_id);
+               PlayerStats_GameReport_AddEvent(sprintf("kills-%d", it.playerid));
+               if (IS_BOT_CLIENT(it) || CS_CVAR(it).cvar_cl_allow_uidtracking)
+                       PlayerStats_GameReport_AddPlayer(it);
+       });
+       FOREACH(Scores, true, {
+               string label = scores_label(it);
+               if (label == "")
+                       continue;
+               PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_TOTAL, label));
+               PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label));
+       });
+       for(int i = 0; i < MAX_TEAMSCORE; ++i)
+       {
+               string label = teamscores_label(i);
+               if (label == "")
+                       continue;
+               PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_TOTAL, label));
+               PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label));
+       }
+}
+
 void PlayerStats_GameReport_AddPlayer(entity e)
 {
        if((PS_GR_OUT_DB < 0) || (e.playerstats_id)) { return; }
index 468645b360454143f49564b43dc7d86162d0b980..39ffab623ef94d5f3790d2e7e9693efa75528ecc 100644 (file)
@@ -56,6 +56,8 @@ const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
 // delay map switch until this is set
 bool PlayerStats_GameReport_DelayMapVote;
 
+void PlayerStats_GameReport_Reset_All();
+
 // call at initialization
 void PlayerStats_GameReport_Init();
 
index 77e4ccad264fee8f912abdb8573ba154af71289c..e9f418ad9c24f79063b80dd848bc9f7f056cbe46 100644 (file)
                if (me.clickTime > 0 && me.clickTime <= frametime)
                {
                        // keyboard click timer expired? Fire the event then.
-                       if (!me.disabled)
-                               if (me.onClick) me.onClick(me, me.onClickEntity);
+                       if (!me.disabled && me.onClick)
+                       {
+                               if(me.applyButton)
+                                       me.applyButton.disabled = false;
+                               me.onClick(me, me.onClickEntity);
+                               if(me.disableOnClick)
+                                       me.disabled = true;
+                       }
                }
                me.clickTime -= frametime;
 
index c990c921208b4d2dc4908958f0f9234517b00540..e20a13a8ee58a95ca3fe06b899a2d87409375ef5 100644 (file)
@@ -452,10 +452,11 @@ void XonoticServerList_draw(entity me)
        for(int i = 0; i < category_draw_count; ++i) { category_name[i] = -1; category_item[i] = -1; }
        category_draw_count = 0;
 
+       me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
+
        if(autocvar_menu_slist_categories >= 0) // if less than 0, don't even draw a category heading for favorites
        {
-               float itemcount = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
-               me.nItems = itemcount;
+               int itemcount = me.nItems;
 
                //float visible = floor(me.scrollPos / me.itemHeight);
                // ^ unfortunately no such optimization can be made-- we must process through the
@@ -538,7 +539,6 @@ void XonoticServerList_draw(entity me)
                        me.nItems = itemcount;
                }
        }
-       else { me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT); }
 
        me.connectButton.disabled = (me.ipAddressBox.text == "");
        //me.disconnectButton.disabled = (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)));
@@ -783,8 +783,8 @@ void ServerList_Info_Click(entity btn, entity me)
        if (me.nItems != 0)
                main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
 
-       float thisPos = me.getItemStart(me, me.selectedItem); 
-       float thisHeight = me.getItemHeight(me, me.selectedItem); 
+       float thisPos = me.getItemStart(me, me.selectedItem);
+       float thisHeight = me.getItemHeight(me, me.selectedItem);
        vector org = boxToGlobal(eY * (thisPos - me.scrollPos), me.origin, me.size);
        vector sz = boxToGlobalSize(eY * thisHeight + eX * (1 - me.controlWidth), me.size);
        DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
@@ -1153,7 +1153,7 @@ int XonoticServerList_getItemAtPos(entity me, float pos)
        pos = pos / me.itemHeight;
        for (int i = category_draw_count - 1; i >= 0; --i) {
                int itemidx = category_item[i];
-               float itempos = i * me.categoriesHeight + category_item[i] * me.serversHeight;
+               float itempos = i * me.categoriesHeight + itemidx * me.serversHeight;
                if (pos >= itempos + me.categoriesHeight + me.serversHeight)
                        return itemidx + 1 + floor((pos - (itempos + me.categoriesHeight + me.serversHeight)) / me.serversHeight);
                if (pos >= itempos)
@@ -1166,7 +1166,7 @@ float XonoticServerList_getItemStart(entity me, int item)
 {
        for (int i = category_draw_count - 1; i >= 0; --i) {
                int itemidx = category_item[i];
-               float itempos = i * me.categoriesHeight + category_item[i] * me.serversHeight;
+               float itempos = i * me.categoriesHeight + itemidx * me.serversHeight;
                if (item >= itemidx + 1)
                        return (itempos + me.categoriesHeight + (1 + item - (itemidx + 1)) * me.serversHeight) * me.itemHeight;
                if (item >= itemidx)
@@ -1179,8 +1179,9 @@ float XonoticServerList_getItemHeight(entity me, int item)
 {
        for (int i = 0; i < category_draw_count; ++i) {
                // Matches exactly the headings with increased height.
+               // FIXME server row next to the heading is slightly smaller than others if (autocvar_menu_slist_categories <= 0)
                if (item == category_item[i])
-                       return me.itemHeight * (me.categoriesHeight + 1);
+                       return me.itemHeight * (me.categoriesHeight + me.serversHeight);
        }
        return me.itemHeight * me.serversHeight;
 }
index a8a8747e1822558f0b3c572b58a5d105b7d4c773..7241b7415dbb4487035fdca152c73ac2c99bfca8 100644 (file)
@@ -374,32 +374,25 @@ void ClientCommand_ready(entity caller, int request)  // todo: anti-spam for tog
                {
                        if (IS_CLIENT(caller))
                        {
-                               if (warmup_stage || autocvar_sv_ready_restart || g_race_qualifying == 2)
+                               if (warmup_stage || g_race_qualifying == 2)
                                {
-                                       if (!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
+                                       if (time < game_starttime) // game is already restarting
+                                               return;
+                                       if (caller.ready)            // toggle
                                        {
-                                               if (time < game_starttime) // game is already restarting
-                                                       return;
-                                               if (caller.ready)            // toggle
-                                               {
-                                                       caller.ready = false;
-                                                       if(IS_PLAYER(caller) || caller.caplayer == 1)
-                                                               bprint(playername(caller.netname, caller.team, false), "^2 is ^1NOT^2 ready\n");
-                                               }
-                                               else
-                                               {
-                                                       caller.ready = true;
-                                                       if(IS_PLAYER(caller) || caller.caplayer == 1)
-                                                               bprint(playername(caller.netname, caller.team, false), "^2 is ready\n");
-                                               }
-
-                                               // cannot reset the game while a timeout is active!
-                                               if (!timeout_status) ReadyCount();
+                                               caller.ready = false;
+                                               if(IS_PLAYER(caller) || caller.caplayer == 1)
+                                                       bprint(playername(caller.netname, caller.team, false), "^2 is ^1NOT^2 ready\n");
                                        }
                                        else
                                        {
-                                               sprint(caller, "^1Game has already been restarted\n");
+                                               caller.ready = true;
+                                               if(IS_PLAYER(caller) || caller.caplayer == 1)
+                                                       bprint(playername(caller.netname, caller.team, false), "^2 is ready\n");
                                        }
+
+                                       // cannot reset the game while a timeout is active!
+                                       if (!timeout_status) ReadyCount();
                                }
                        }
                        return;  // never fall through to usage
index f2f72157140916a6e483117cee46eabbab424fc7..802afc8bde6f86e1ed3e145df61f111ea51ec715 100644 (file)
@@ -2,8 +2,6 @@
 
 float autocvar_sv_clientcommand_antispam_time;
 int autocvar_sv_clientcommand_antispam_count;
-bool autocvar_sv_ready_restart;
-bool autocvar_sv_ready_restart_repeatable;
 
 .float cmd_floodtime;
 .float cmd_floodcount;
index 0f97fbe6b5e368b2a1d3952b30d3df776688def6..daa59b5cf7bed78d48d035326644f82061460b0a 100644 (file)
@@ -162,7 +162,13 @@ void GameCommand_allready(int request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       ReadyRestart();
+                       if(warmup_stage)
+                       {
+                               ReadyRestart(true);
+                       }
+                       else
+                               LOG_INFO("Not in warmup.");
+
                        return;
                }
 
@@ -1308,6 +1314,26 @@ void GameCommand_shuffleteams(int request)
        }
 }
 
+void GameCommand_resetmatch(int request)
+{
+       switch (request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       ReadyRestart(false);
+                       return;
+               }
+
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       LOG_HELP("Usage:^3 sv_cmd resetmatch");
+                       LOG_HELP("  No arguments required.");
+                       return;
+               }
+       }
+}
+
 void GameCommand_stuffto(int request, int argc)
 {
        // This... is a fairly dangerous and powerful command... - It allows any arguments to be sent to a client via rcon.
@@ -1629,7 +1655,7 @@ void GameCommand_(int request)
 
 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
 SERVER_COMMAND(adminmsg, "Send an admin message to a client directly") { GameCommand_adminmsg(request, arguments); }
-SERVER_COMMAND(allready, "Restart the server and reset the players") { GameCommand_allready(request); }
+SERVER_COMMAND(allready, "Ends warmup and starts the match") { GameCommand_allready(request); }
 SERVER_COMMAND(allspec, "Force all players to spectate") { GameCommand_allspec(request, arguments); }
 SERVER_COMMAND(anticheat, "Create an anticheat report for a client") { GameCommand_anticheat(request, arguments); }
 SERVER_COMMAND(animbench, "Benchmark model animation (LAGS)") { GameCommand_animbench(request, arguments); }
@@ -1652,6 +1678,7 @@ SERVER_COMMAND(nospectators, "Automatically remove spectators from a match") { G
 SERVER_COMMAND(printstats, "Dump eventlog player stats and other score information") { GameCommand_printstats(request); }
 SERVER_COMMAND(radarmap, "Generate a radar image of the map") { GameCommand_radarmap(request, arguments); }
 SERVER_COMMAND(reducematchtime, "Decrease the timelimit value incrementally") { GameCommand_reducematchtime(request); }
+SERVER_COMMAND(resetmatch, "Soft restart the game without changing teams; goes back to warmup if enabled") { GameCommand_resetmatch(request); }
 SERVER_COMMAND(setbots, "Adjust how many bots are in the match") { GameCommand_setbots(request, arguments); }
 SERVER_COMMAND(shuffleteams, "Randomly move players to different teams") { GameCommand_shuffleteams(request); }
 SERVER_COMMAND(stuffto, "Send a command to be executed on a client") { GameCommand_stuffto(request, arguments); }
index ffc81c4685794480cf749cea7b87129134b8de71..f8345bd83a8ebf783491420d544e50e39cf65272 100644 (file)
@@ -23,6 +23,7 @@
 #include <server/round_handler.qh>
 #include <server/scores.qh>
 #include <server/teamplay.qh>
+#include <server/weapons/accuracy.qh>
 #include <server/world.qh>
 
 // =============================================
@@ -335,12 +336,15 @@ void VoteThink()
 // =======================
 
 // Resets the state of all clients, items, weapons, waypoints, ... of the map.
-void reset_map(bool dorespawn)
+void reset_map(bool dorespawn, bool is_fake_round_start)
 {
        if (time <= game_starttime)
        {
                if (game_stopped)
                        return;
+
+               if (!is_fake_round_start)
+                       PlayerStats_GameReport_Reset_All();
                if (round_handler_IsActive())
                        round_handler_Reset(game_starttime);
        }
@@ -351,8 +355,11 @@ void reset_map(bool dorespawn)
                shuffleteams_on_reset_map = false;
        }
 
-       FOREACH_CLIENT(IS_PLAYER(it),
-       {
+       FOREACH_CLIENT(true, {
+               if (time <= game_starttime)
+                       accuracy_reset(it); // for spectators too because weapon accuracy is persistent
+               if (!IS_PLAYER(it))
+                       continue;
                if (STAT(FROZEN, it))
                        Unfreeze(it, false);
                player_powerups_remove_all(it);
@@ -390,25 +397,16 @@ void reset_map(bool dorespawn)
        {
                if (!MUTATOR_CALLHOOK(reset_map_players))
                {
-                       if (restart_mapalreadyrestarted || (time < game_starttime))
+                       FOREACH_CLIENT(IS_PLAYER(it),
                        {
-                               FOREACH_CLIENT(IS_PLAYER(it),
-                               {
-                                       /*
-                                       only reset players if a restart countdown is active
-                                       this can either be due to cvar sv_ready_restart_after_countdown having set
-                                       restart_mapalreadyrestarted to 1 after the countdown ended or when
-                                       sv_ready_restart_after_countdown is not used and countdown is still running
-                                       */
-                                       // PlayerScore_Clear(it);
-                                       CS(it).killcount = 0;
-                                       // stop the player from moving so that he stands still once he gets respawned
-                                       it.velocity = '0 0 0';
-                                       it.avelocity = '0 0 0';
-                                       CS(it).movement = '0 0 0';
-                                       PutClientInServer(it);
-                               });
-                       }
+                               // PlayerScore_Clear(it);
+                               CS(it).killcount = 0;
+                               // stop the player from moving so that he stands still once he gets respawned
+                               it.velocity = '0 0 0';
+                               it.avelocity = '0 0 0';
+                               CS(it).movement = '0 0 0';
+                               PutClientInServer(it);
+                       });
                }
        }
 }
@@ -416,19 +414,18 @@ void reset_map(bool dorespawn)
 // Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
 void ReadyRestart_think(entity this)
 {
-       restart_mapalreadyrestarted = true;
-       reset_map(true);
+       reset_map(true, false);
        Score_ClearAll();
        delete(this);
 }
 
 // Forces a restart of the game without actually reloading the map // this is a mess...
-void ReadyRestart_force()
+void ReadyRestart_force(bool is_fake_round_start)
 {
        if (time <= game_starttime && game_stopped)
                return;
-
-       bprint("^1Server is restarting...\n");
+       if (!is_fake_round_start)
+               bprint("^1Match is restarting...\n");
 
        VoteReset();
 
@@ -437,23 +434,20 @@ void ReadyRestart_force()
                cvar_set("timelimit", ftos(autocvar_timelimit - (checkrules_overtimesadded * autocvar_timelimit_overtime)));
        checkrules_suddendeathend = checkrules_overtimesadded = checkrules_suddendeathwarning = 0;
 
-       readyrestart_happened = true;
-       game_starttime = time + RESTART_COUNTDOWN;
+       if(warmup_stage)
+               game_starttime = time; // Warmup: No countdown in warmup
+       else
+               game_starttime = time + RESTART_COUNTDOWN; // Go into match mode
 
        // clear player attributes
        FOREACH_CLIENT(IS_PLAYER(it), {
                it.alivetime = 0;
                CS(it).killcount = 0;
-               float val = PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, 0);
-               PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, -val);
        });
 
-       restart_mapalreadyrestarted = false; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
-
-       // disable the warmup global for the server
-       if(warmup_stage)
+       // if we're ending the warmup stage call the corresponding hook
+       if(!is_fake_round_start && !warmup_stage)
                localcmd("\nsv_hook_warmupend\n");
-       warmup_stage = 0;                // once the game is restarted the game is in match stage
 
        // reset the .ready status of all players (also spectators)
        FOREACH_CLIENT(IS_REAL_CLIENT(it), { it.ready = false; });
@@ -462,13 +456,10 @@ void ReadyRestart_force()
 
        // lock teams with lockonrestart
        if (autocvar_teamplay_lockonrestart && teamplay)
-       {
-               lockteams = true;
-               bprint("^1The teams are now locked.\n");
-       }
+               lockteams = !warmup_stage;
 
        // initiate the restart-countdown-announcer entity
-       if (sv_ready_restart_after_countdown)
+       if (!is_fake_round_start && sv_ready_restart_after_countdown && !warmup_stage)
        {
                entity restart_timer = new_pure(restart_timer);
                setthink(restart_timer, ReadyRestart_think);
@@ -481,11 +472,11 @@ void ReadyRestart_force()
                FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; });
        }
 
-       if (!sv_ready_restart_after_countdown) reset_map(true);
+       if (!sv_ready_restart_after_countdown || warmup_stage) reset_map(true, is_fake_round_start);
        if (autocvar_sv_eventlog) GameLogEcho(":restart");
 }
 
-void ReadyRestart()
+void ReadyRestart(bool forceWarmupEnd)
 {
        if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing) localcmd("restart\n");
        else localcmd("\nsv_hook_readyrestart\n");
@@ -493,7 +484,13 @@ void ReadyRestart()
        // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
        // Otherwise scores could be manipulated during the countdown.
        if (!sv_ready_restart_after_countdown) Score_ClearAll();
-       ReadyRestart_force();
+
+       if(forceWarmupEnd)
+               warmup_stage = 0; // forcefully end warmup and go to match stage
+       else
+               warmup_stage = cvar("g_warmup"); // go into warmup if it's enabled, otherwise restart into match stage
+
+       ReadyRestart_force(false);
 }
 
 // Count the players who are ready and determine whether or not to restart the match
@@ -514,7 +511,7 @@ void ReadyCount()
        ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 0.999);
        ready_needed_count = floor(t_players * ready_needed_factor) + 1;
 
-       if (readycount >= ready_needed_count) ReadyRestart();
+       if (readycount >= ready_needed_count) ReadyRestart(true);
 }
 
 
@@ -764,12 +761,23 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                }
 
                case "restart":
+               case "resetmatch":  // re-direct all match restarting to resetmatch
                {
-                       // add a delay so that vote result can be seen and announcer can be heard
-                       // if the vote is accepted
-                       vote_parsed_command = strcat("defer 1 ", vote_command);
-                       vote_parsed_display = strzone(strcat("^1", vote_command));
+                       vote_parsed_command = "resetmatch";
+                       vote_parsed_display = strzone("^1resetmatch");
+
+                       break;
+               }
 
+               case "allready":
+               {
+                       if(!warmup_stage) {
+                               print_to(caller, "Game already started. Use the resetmatch command to restart the match.");
+                               return -1;
+                       }
+
+                       vote_parsed_command = vote_command;
+                       vote_parsed_display = strzone(strcat("^1", vote_command));
                        break;
                }
 
index 4dfd9e8575f2abf22c9cdc1e639171ca64988e0e..63c9e8e453765892bff4823cc41de0e7865e1453 100644 (file)
@@ -63,15 +63,13 @@ void VoteCommand(int request, entity caller, int argc, string vote_command);
 const float RESTART_COUNTDOWN = 10;
 entity nagger;
 float readycount;                  // amount of players who are ready
-float readyrestart_happened;       // keeps track of whether a restart has already happened
-float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed
 .float ready;                      // flag for if a player is ready
 .int team_saved;                   // team number to restore upon map reset
 .void(entity this) reset;             // if set, an entity is reset using this
 .void(entity this) reset2;         // if set, an entity is reset using this (after calling ALL the reset functions for other entities)
-void reset_map(float dorespawn);
+void reset_map(float dorespawn, bool is_fake_round_start);
 void ReadyCount();
-void ReadyRestart_force();
+void ReadyRestart_force(bool is_fake_round_start);
 void VoteCount(float first_count);
 void Nagger_Init();
 
index cf91b9de4bafd7d6b250a860732702a82222f409..2b29422b8969362356b6a552106158c9b881d0e7 100644 (file)
@@ -331,8 +331,8 @@ void StartFrame()
        CreatureFrame_All();
        CheckRules_World();
 
-       if (warmup_stage && !game_stopped && warmup_limit > 0 && time >= warmup_limit) {
-               ReadyRestart();
+       if (warmup_stage && !game_stopped && warmup_limit > 0 && time - game_starttime >= warmup_limit) {
+               ReadyRestart(true);
                return;
        }
 
index 93c3835271a049b796eaab6a2ff4911ebfe7b6fd..5307eca782a827398f66eed801fdd73682d458b4 100644 (file)
@@ -28,7 +28,7 @@ void round_handler_Think(entity this)
                this.wait = false;
                this.cnt = this.count + 1;  // init countdown
                round_starttime = time + this.count;
-               reset_map(true);
+               reset_map(true, false);
        }
 
        if (this.cnt > 0)  // countdown running
index c26a0b16550ac51062a40c742468d5f93f214076..7257156a9693b44b28b4b2ed7698d11702f507eb 100644 (file)
@@ -35,7 +35,7 @@ const int TEAM_NOT_ALLOWED = -1;
 .int m_num_players; ///< Number of players (both humans and bots) in a team.
 .int m_num_bots; ///< Number of bots in a team.
 .int m_num_players_alive; ///< Number of alive players in a team.
-.int m_num_control_points; ///< Number of control points owned by a team.
+.int m_num_owned_items; ///< Number of items owned by a team.
 
 string autocvar_g_forced_team_red;
 string autocvar_g_forced_team_blue;
@@ -92,6 +92,21 @@ void Team_SetNumberOfAlivePlayers(entity team_ent, int number)
        team_ent.m_num_players_alive = number;
 }
 
+int Team_GetWinnerAliveTeam()
+{
+       int winner = 0;
+       for (int i = 0; i < NUM_TEAMS; ++i)
+       {
+               if (g_team_entities[i].m_num_players_alive > 0)
+               {
+                       if (winner)
+                               return 0;
+                       winner = Team_IndexToTeam(i + 1);
+               }
+       }
+       return (winner ? winner : -1);
+}
+
 int Team_GetNumberOfAliveTeams()
 {
        int result = 0;
@@ -105,22 +120,37 @@ int Team_GetNumberOfAliveTeams()
        return result;
 }
 
-int Team_GetNumberOfControlPoints(entity team_ent)
+int Team_GetWinnerTeam_WIthOwnedItems(int min_control_points)
+{
+       int winner = 0;
+       for (int i = 0; i < NUM_TEAMS; ++i)
+       {
+               if (g_team_entities[i].m_num_owned_items >= min_control_points)
+               {
+                       if (winner)
+                               return 0;
+                       winner = Team_IndexToTeam(i + 1);
+               }
+       }
+       return (winner ? winner : -1);
+}
+
+int Team_GetNumberOfOwnedItems(entity team_ent)
 {
-       return team_ent.m_num_control_points;
+       return team_ent.m_num_owned_items;
 }
 
-void Team_SetNumberOfControlPoints(entity team_ent, int number)
+void Team_SetNumberOfOwnedItems(entity team_ent, int number)
 {
-       team_ent.m_num_control_points = number;
+       team_ent.m_num_owned_items = number;
 }
 
-int Team_GetNumberOfTeamsWithControlPoints()
+int Team_GetNumberOfTeamsWithOwnedItems()
 {
        int result = 0;
        for (int i = 0; i < NUM_TEAMS; ++i)
        {
-               if (g_team_entities[i].m_num_control_points > 0)
+               if (g_team_entities[i].m_num_owned_items > 0)
                {
                        ++result;
                }
index 06787c6ffa06c72ec593b4429560949c99e74996..a94b247a8a64150d78ba6c1ca52200ff16b70350 100644 (file)
@@ -51,23 +51,32 @@ int Team_GetNumberOfAlivePlayers(entity team_ent);
 /// \param[in] number Number of players to set.
 void Team_SetNumberOfAlivePlayers(entity team_ent, int number);
 
+/// \brief Returns the winner team.
+/// \return Winner team or 0 if 2 or more teams have alive players or -1 if no team has any alive players.
+int Team_GetWinnerAliveTeam();
+
 /// \brief Returns the number of alive teams.
 /// \return Number of alive teams.
 int Team_GetNumberOfAliveTeams();
 
-/// \brief Returns the number of control points owned by a team.
+/// \brief Returns the winner team.
+/// \param[in] min_owned_items Minimum number of items the winner team must have.
+/// \return Winner team or 0 if 2 or more teams own items or -1 if no team own any items.
+int Team_GetWinnerTeam_WIthOwnedItems(int min_owned_items);
+
+/// \brief Returns the number of items owned by a team.
 /// \param[in] team_ent Team entity.
-/// \return Number of control points owned by a team.
-int Team_GetNumberOfControlPoints(entity team_ent);
+/// \return Number of items owned by a team.
+int Team_GetNumberOfOwnedItems(entity team_ent);
 
-/// \brief Sets the number of control points owned by a team.
+/// \brief Sets the number of items owned by a team.
 /// \param[in,out] team_ent Team entity.
-/// \param[in] number Number of control points to set.
-void Team_SetNumberOfControlPoints(entity team_ent, int number);
+/// \param[in] number Number of items to set.
+void Team_SetNumberOfOwnedItems(entity team_ent, int number);
 
-/// \brief Returns the number of teams that own control points.
-/// \return Number of teams that own control points.
-int Team_GetNumberOfTeamsWithControlPoints();
+/// \brief Returns the number of teams that own items.
+/// \return Number of teams that own items.
+int Team_GetNumberOfTeamsWithOwnedItems();
 
 // ======================= Entity specific API ================================
 
index 2fe010f645c0c9a2c953df6c875cf50d0351c5c2..337ae54a98c86d4b889bb03da4b1cac0439116ee 100644 (file)
@@ -55,6 +55,21 @@ void accuracy_free(entity e)
        delete(CS(e).accuracy);
 }
 
+void accuracy_reset(entity e)
+{
+       entity a = CS(e).accuracy;
+       if (!a) return;
+
+       for (int i = 0; i < REGISTRY_MAX(Weapons); i++)
+       {
+               a.accuracy_frags[i] = 0;
+               a.accuracy_hit[i] = 0;
+               a.accuracy_fired[i] = 0;
+               a.accuracy_cnt_hit[i] = 0;
+               a.accuracy_cnt_fired[i] = 0;
+       }
+}
+
 // force a resend of a player's accuracy stats
 void accuracy_resend(entity e)
 {
index fcdf7c481ae3a185f2c81067be1cbd3c6560c606..81d2b1763bfe4c8e9f82b408cf61be22c60ee314 100644 (file)
@@ -38,6 +38,8 @@ REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
 void accuracy_init(entity e);
 void accuracy_free(entity e);
 
+void accuracy_reset(entity e);
+
 // force a resend of a player's accuracy stats
 void accuracy_resend(entity e);
 
index 728c9d757e6ffa77ad2f1edfc0637492dc2c8c0f..580073830f81f48f682669399eb4f8bb6c51387b 100644 (file)
@@ -494,7 +494,6 @@ void cvar_changes_init()
                BADCVAR("sv_maxrate");
                BADCVAR("sv_motd");
                BADCVAR("sv_public");
-               BADCVAR("sv_ready_restart");
                BADCVAR("sv_showfps");
                BADCVAR("sv_status_privacy");
                BADCVAR("sv_taunt");
@@ -1300,10 +1299,18 @@ void NextLevel()
 
        GameLogClose();
 
-       FOREACH_CLIENT(IS_PLAYER(it), {
+       int winner_team = 0;
+       FOREACH_CLIENT(IS_PLAYER(it) || it.caplayer, {
                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();
@@ -1383,13 +1390,13 @@ float GetWinningCode(float fraglimitreached, float equality)
 // 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) || it.caplayer, { 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) || it.caplayer, {
                if(it.(field) == value)
                        it.winning = 1;
        });
@@ -1398,7 +1405,7 @@ void AddWinners(.float field, float value)
 // clear the .winning flags
 void ClearWinners()
 {
-       FOREACH_CLIENT(IS_PLAYER(it), { it.winning = 0; });
+       FOREACH_CLIENT(IS_PLAYER(it) || it.caplayer, { it.winning = 0; });
 }
 
 int fragsleft_last;
@@ -1645,7 +1652,7 @@ void CheckRules_World()
                                if(readyplayers || playerswithlaps >= 2)
                                {
                                        checkrules_suddendeathend = 0;
-                                       ReadyRestart(); // go to race
+                                       ReadyRestart(true); // go to race
                                        return;
                                }
                                else
index bdaac8c271e5ae08f79af6ba5f32e02fa8fb717c..3f6b9b6d22d676abd06947c077560d28e6924307 100644 (file)
@@ -134,7 +134,7 @@ const int WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath
 
 float WinningCondition_Scores(float limit, float leadlimit);
 void SetWinners(.float field, float value);
-void ReadyRestart();
+void ReadyRestart(bool forceWarmupEnd);
 
 void DumpStats(float final);
 
index d83357851386d29a7fe3e2d3ce97231f98f857d1..0f374902a0b86be3fceab9e67128f7e2afd18479 100644 (file)
@@ -15,9 +15,7 @@ set minplayers 0 "fill server with bots to reach this number of players in teaml
 set minplayers_per_team 0 "fill server with bots to reach this number of players per team (if bot_number is not enough)"
 
 // restart server if all players hit "ready"-button
-set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
 set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
-set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
 
 alias sv_hook_readyrestart