- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- make
- - EXPECT=f83676ceba1516c8f365f49c3d1743d5
+ - EXPECT=dadf46a9a22616987f627eabac8e747b
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
-Sat Jul 14 07:24:18 CEST 2018
+Mon Jul 23 07:24:17 CEST 2018
// networked/server common commands
alias cvar_changes "qc_cmd_svcmd cvar_changes ${* ?}" // Prints a list of all changed server cvars
alias cvar_purechanges "qc_cmd_svcmd cvar_purechanges ${* ?}" // Prints a list of all changed gameplay cvars
+alias editmob "qc_cmd_svcmd editmob ${* ?}" // Modifies a monster or all monsters
alias info "qc_cmd_svcmd info ${* ?}" // Request for unique server information set up by admin
alias ladder "qc_cmd_svcmd ladder ${* ?}" // Get information about top players if supported
alias lsmaps "qc_cmd_svcmd lsmaps ${* ?}" // List maps which can be used with the current game mode
// generic commands (across all programs)
alias addtolist "qc_cmd_svmenu addtolist ${* ?}" // Add a string to a cvar
+alias bufstr_get "qc_cmd_svmenu bufstr_get ${* ?}" // Examine a string buffer object
+alias cvar_localchanges "qc_cmd_svmenu cvar_localchanges ${* ?}" // Print locally changed cvars
alias dumpcommands "qc_cmd_svmenu dumpcommands ${* ?}" // Dump all commands on the program to *_cmd_dump.txt
-alias dumpnotifs "qc_cmd_svcl dumpnotifs ${* ?}" // Dump all notifications into notifications_dump.txt
+alias dumpnotifs "qc_cmd_svmenu dumpnotifs ${* ?}" // Dump all notifications into notifications_dump.txt
+alias dumpitems "qc_cmd_svmenu dumpitems ${* ?}" // Dump all items to the console
+alias dumpturrets "qc_cmd_svmenu dumpturrets ${* ?}" // Dump all turrets into turrets_dump.txt
+alias dumpweapons "qc_cmd_svmenu dumpweapons ${* ?}" // Dump all weapons into weapons_dump.txt
+alias find "qc_cmd_svmenu find ${* ?}" // Search through entities for matching classname
+alias findat "qc_cmd_svmenu findat ${* ?}" // Search through entities for matching origin
alias maplist "qc_cmd_svmenu maplist ${* ?}" // Automatic control of maplist
+alias mx "qc_cmd_svmenu mx ${* ?}" // Send a matrix command
alias nextframe "qc_cmd_svmenu nextframe ${* ?}" // Execute the given command next frame of this VM
alias qc_curl "qc_cmd_svmenu qc_curl ${* ?}" // Queries a URL
alias removefromlist "qc_cmd_svmenu removefromlist ${* ?}" // Remove a string from a cvar
-alias restartnotifs "qc_cmd_svcl restartnotifs ${* ?}" // Re-initialize all notifications
+alias restartnotifs "qc_cmd_svmenu restartnotifs ${* ?}" // Re-initialize all notifications
alias rpn "qc_cmd_svmenu rpn ${* ?}" // RPN calculator
+alias runtest "qc_cmd_svmenu runtest ${* ?}" // Run unit tests
//alias settemp "qc_cmd_svmenu settemp ${* ?}" // Temporarily set a value to a cvar which is restored later
//alias settemp_restore "qc_cmd_svmenu settemp_restore ${* ?}" // Restore all cvars set by settemp command
+alias version "qc_cmd_svmenu version ${* ?}" // Print the current version
// other aliases for common commands
alias g_hitplots_add "qc_cmd_svmenu rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} union def"
// ==========================================================
// commented out commands are really only intended for internal use
alias blurtest "qc_cmd_cl blurtest ${* ?}" // Feature for testing blur postprocessing
+alias boxparticles "qc_cmd_cl boxparticles ${* ?}" // Spawn particles manually
alias create_scrshot_ent "qc_cmd_cl create_scrshot_ent ${* ?}" // Create an entity at this location for automatic screenshots
alias debugmodel "qc_cmd_cl debugmodel ${* ?}" // Spawn a debug model manually
//alias handlevote "qc_cmd_cl handlevote ${* ?}" // System to handle selecting a vote or option
alias localprint "qc_cmd_cl localprint ${* ?}" // Create your own centerprint sent to yourself
//alias mv_download "qc_cmd_cl mv_download ${* ?}" // Retrieve mapshot picture from the server
alias sendcvar "qc_cmd_cl sendcvar ${* ?}" // Send a cvar to the server (like weaponpriority)
+alias weapon_find "qc_cmd_cl weapon_find ${* ?}" // Show spawn locations of a weapon
+
alias exit "quit"
// other aliases for local commands
// commented out commands are really only intended for internal use, or already have declaration in the engine
alias autoswitch "qc_cmd_cmd autoswitch ${* ?}" // Whether or not to switch automatically when getting a better weapon
alias clientversion "qc_cmd_cmd clientversion ${* ?}" // Release version of the game
-//alias mv_getpicture "qc_cmd_cmd mv_getpicture ${* ?}" // Retrieve mapshot picture from the server
alias join "qc_cmd_cmd join ${* ?}" // Become a player in the game
+alias minigame "qc_cmd_cmd minigame ${* ?}" // Start a minigame
+//alias mv_getpicture "qc_cmd_cmd mv_getpicture ${* ?}" // Retrieve mapshot picture from the server
+alias physics "qc_cmd_cmd physics ${* ?}" // Change physics set
alias ready "qc_cmd_cmd ready ${* ?}" // Qualify as ready to end warmup stage (or restart server if allowed)
-alias reportcvar "qc_cmd_cmd reportcvar ${* ?}" // Old system for sending a client cvar to the server
//alias say "qc_cmd_cmd say ${* ?}" // Print a message to chat to all players
//alias say_team "qc_cmd_cmd say_team ${* ?}" // Print a message to chat to all team mates
alias selectteam "qc_cmd_cmd selectteam ${* ?}" // Attempt to choose a team to join into
alias selfstuff "qc_cmd_cmd selfstuff ${* ?}" // Stuffcmd a command to your own client
alias sentcvar "qc_cmd_cmd sentcvar ${* ?}" // New system for sending a client cvar to the server
-alias editmob "qc_cmd_cmd editmob ${* ?}" // Edit a monster's properties
-alias physics "qc_cmd_cmd physics ${* ?}" // Change physics set
alias spectate "qc_cmd_cmd spectate ${* ?}" // Become an observer
alias suggestmap "qc_cmd_cmd suggestmap ${* ?}" // Suggest a map to the mapvote at match end
//alias tell "qc_cmd_cmd tell ${* ?}" // Send a message directly to a player
alias adminmsg "qc_cmd_sv adminmsg ${* ?}" // Send an admin message to a client directly
alias allready "qc_cmd_sv allready ${* ?}" // Restart the server and reset the players
alias allspec "qc_cmd_sv allspec ${* ?}" // Force all players to spectate
+alias animbench "qc_cmd_sv animbench ${* ?}" // Benchmark model animation (LAGS)
alias anticheat "qc_cmd_sv anticheat ${* ?}" // Create an anticheat report for a client
alias bbox "qc_cmd_sv bbox ${* ?}" // Print detailed information about world size
alias bot_cmd "qc_cmd_sv bot_cmd ${* ?}" // Control and send commands to bots
alias delrec "qc_cmd_sv delrec ${* ?}" // Delete race time record for a map
alias effectindexdump "qc_cmd_sv effectindexdump ${* ?}" // Dump list of effects from code and effectinfo.txt
alias extendmatchtime "qc_cmd_sv extendmatchtime ${* ?}" // Increase the timelimit value incrementally
-alias find "qc_cmd_sv find ${* ?}" // Search through entities for matching classname
alias gametype "qc_cmd_sv gametype ${* ?}" // Simple command to change the active gametype
alias gettaginfo "qc_cmd_sv gettaginfo ${* ?}" // Get specific information about a weapon model
alias gotomap "qc_cmd_sv gotomap ${* ?}" // Simple command to switch to another map
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2018-07-10 10:55+0000\n"
+"PO-Revision-Date: 2018-07-18 12:01+0000\n"
"Last-Translator: nad le <nadavlevi726@gmail.com>\n"
"Language-Team: Hebrew (http://www.transifex.com/team-xonotic/xonotic/"
"language/he/)\n"
#: qcsrc/common/mutators/mutator/nades/nades.qh:32
msgid "Grenade"
-msgstr ""
+msgstr "רימון"
#: qcsrc/common/mutators/mutator/overkill/hmg.qh:17
msgid "Heavy Machine Gun"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:5
msgid "Here"
-msgstr ""
+msgstr "כאן"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:6
msgid "DANGER"
-msgstr ""
+msgstr "סכנה"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:8
msgid "Frozen!"
-msgstr ""
+msgstr "קפוא!"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:10
msgid "Item"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:39
msgid "Run here"
-msgstr ""
+msgstr "רוץ לכאן"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:45
#: qcsrc/common/mutators/mutator/waypoints/all.inc:48
#: qcsrc/menu/xonotic/dialog_settings_input.qc:59
msgid "Sensitivity:"
-msgstr ""
+msgstr "רגישות:"
#: qcsrc/menu/xonotic/dialog_settings_input.qc:61
msgid "Mouse speed multiplier"
#: qcsrc/menu/xonotic/dialog_settings_input.qc:96
msgid "Automatically repeat jumping if holding jump"
-msgstr ""
+msgstr "המשך לקפוץ באופן אוטומטי אם מקש קפיצה לחוץ"
#: qcsrc/menu/xonotic/dialog_settings_input.qc:99
msgid "Jetpack on jump:"
#: qcsrc/menu/xonotic/dialog_settings_video.qc:119
msgid "Brightness:"
-msgstr ""
+msgstr "בהירות:"
#: qcsrc/menu/xonotic/dialog_settings_video.qc:121
msgid "Brightness of black (default: 0)"
#: qcsrc/menu/xonotic/dialog_settings_video.qc:123
msgid "Contrast:"
-msgstr ""
+msgstr "ניגודיות:"
#: qcsrc/menu/xonotic/dialog_settings_video.qc:125
msgid "Brightness of white (default: 1)"
#: qcsrc/menu/xonotic/serverlist.qc:763
msgid "Ping"
-msgstr ""
+msgstr "פינג"
#: qcsrc/menu/xonotic/serverlist.qc:764
msgid "Hostname"
#: qcsrc/menu/xonotic/serverlist.qc:766
msgid "Type"
-msgstr ""
+msgstr "סוג"
#: qcsrc/menu/xonotic/serverlist.qc:1060
#, c-format
"texture memory usage, but make the textures appear very blurry. (default: "
"good)"
msgstr ""
+"שנה את החדות של טקסטורות.\n"
+"הנמכה תגרום לצמצום יעיל של זיכרון שמשומש על ידי טקסטורות, אבל יגרום "
+"לטקסטורות להראות מאוד מטושטשות. (ברירת מחדל: טוב)"
#: qcsrc/menu/xonotic/slider_resolution.qc:115
msgid "Screen resolution"
#: qcsrc/menu/xonotic/statslist.qc:103
msgid "Last_Seen:"
-msgstr ""
+msgstr "נראה_לאחרונה:"
#: qcsrc/menu/xonotic/statslist.qc:110
msgid "Time_Played:"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2018-05-22 14:42+0000\n"
+"PO-Revision-Date: 2018-07-22 18:03+0000\n"
"Last-Translator: Jean Trindade Pereira <jean_trindade2@hotmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/team-xonotic/"
"xonotic/language/pt_BR/)\n"
#: qcsrc/client/hud/hud_config.qc:239
#, c-format
msgid "^2Successfully exported to %s! (Note: It's saved in data/data/)\n"
-msgstr "^2Exportado com sucesso para %s! (Nota: Foi salvo em data/data/)\n"
+msgstr "^2Exportado com sucesso para %s! (Nota: foi salvo em data/data/)\n"
#: qcsrc/client/hud/hud_config.qc:243
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:167
msgid "^2Waiting for others to ready up to end warmup..."
msgstr ""
-"^2Esperando que os outros jogadores estejam prontos para acabar o "
-"aquecimento..."
+"^2Aguardando outros jogadores ficarem prontos para terminar o aquecimento..."
#: qcsrc/client/hud/panel/infomessages.qc:169
msgid "^2Waiting for others to ready up..."
-msgstr "^2Esperando que os outros jogadores estejam prontos..."
+msgstr "^2Aguardando outros jogadores ficarem prontos..."
#: qcsrc/client/hud/panel/infomessages.qc:175
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:209
msgid "^1Spectating this player:"
-msgstr "^1Também estão assistindo a este jogador:"
+msgstr "^1Assistindo a este jogador:"
#: qcsrc/client/hud/panel/infomessages.qc:209
msgid "^1Spectating you:"
#: qcsrc/client/hud/panel/infomessages.qc:225
msgid "^7Press ^3ESC ^7to show HUD options."
-msgstr "^7Aperte ^3ESC ^7para exibir as opções de HUD."
+msgstr "^7Aperte ^3ESC ^7para exibir as opções de interface."
#: qcsrc/client/hud/panel/infomessages.qc:226
msgid "^3Doubleclick ^7a panel for panel-specific options."
#: qcsrc/client/hud/panel/infomessages.qc:227
msgid "^3CTRL ^7to disable collision testing, ^3SHIFT ^7and"
-msgstr "^3CTRL ^7para desligar teste de colisão, ^3SHIFT ^7e"
+msgstr "Use ^3CTRL ^7para desligar o teste de colisão, e ^3SHIFT ^7e"
#: qcsrc/client/hud/panel/infomessages.qc:228
msgid "^3ALT ^7+ ^3ARROW KEYS ^7for fine adjustments."
#: qcsrc/client/hud/panel/quickmenu.qc:816
msgid "QMCMD^dropped weapon %w^7 (l:%l^7)"
-msgstr "Arma solta %w^7 (l:%l^7)"
+msgstr "Arma largada %w^7 (l:%l^7)"
#: qcsrc/client/hud/panel/quickmenu.qc:817
msgid "QMCMD^drop flag/key, icon"
#: qcsrc/client/hud/panel/quickmenu.qc:821
msgid "QMCMD^Send private message to"
-msgstr "Mandar mensagem privada para"
+msgstr "Enviar mensagem privada para"
#: qcsrc/client/hud/panel/quickmenu.qc:823
#: qcsrc/client/hud/panel/quickmenu.qc:860
#: qcsrc/client/hud/panel/quickmenu.qc:824
#: qcsrc/client/hud/panel/quickmenu.qc:831
msgid "QMCMD^View/HUD settings"
-msgstr "Configurações de Exibição/HUD"
+msgstr "Configurações de exibição/interface"
#: qcsrc/client/hud/panel/quickmenu.qc:825
msgid "QMCMD^3rd person view"
#: qcsrc/client/hud/panel/quickmenu.qc:851
msgid "QMCMD^Decrease speed"
-msgstr "Diminuir velocidade"
+msgstr "Reduzir velocidade"
#: qcsrc/client/hud/panel/quickmenu.qc:852
msgid "QMCMD^Wall collision off"
msgid ""
"You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"
msgstr ""
-"Você pode modificar o placar usando o comando ^2scoreboard_columns_set.\n"
+"É possível modificar o placar usando o comando ^2scoreboard_columns_set.\n"
#: qcsrc/client/hud/panel/scoreboard.qc:296
msgid "^3|---------------------------------------------------------------|\n"
#: qcsrc/client/hud/panel/scoreboard.qc:299
msgid "^2scoreboard_columns_set ^7field1 field2 ...\n"
-msgstr "^2scoreboard_columns_set ^7campo1 campo2...\n"
+msgstr "^2scoreboard_columns_set ^7field1 field2...\n"
#: qcsrc/client/hud/panel/scoreboard.qc:300
msgid "The following field names are recognized (case insensitive):\n"
msgstr ""
-"Os seguintes nomes de campos são reconhecidos (maiúsculas/minúsculas não são "
-"distintas):\n"
+"Os seguintes nomes de campo são reconhecidos (maiúsculas e minúsculas não "
+"diferem):\n"
#: qcsrc/client/hud/panel/scoreboard.qc:301
msgid "You can use a ^3|^7 to start the right-aligned fields.\n"
#: qcsrc/client/hud/panel/scoreboard.qc:308
msgid "^3kills^7 Number of kills\n"
-msgstr "^3vítimas^7 Número de aniquilações\n"
+msgstr "^3vítimas^7 Número de vítimas\n"
#: qcsrc/client/hud/panel/scoreboard.qc:309
msgid "^3deaths^7 Number of deaths\n"
#: qcsrc/client/hud/panel/scoreboard.qc:319
msgid "^3fckills^7 Number of flag carrier kills\n"
-msgstr ""
-"^3pbndvítimas^7 Número de portadores de bandeiras mortos pelo jogador\n"
+msgstr "^3pbndvítimas^7 Número de portadores de bandeiras aniquilados\n"
#: qcsrc/client/hud/panel/scoreboard.qc:320
msgid "^3returns^7 Number of flag returns\n"
#: qcsrc/client/hud/panel/scoreboard.qc:321
msgid "^3drops^7 Number of flag drops\n"
-msgstr "^3quedas^7 Número de bandeiras que foram soltas\n"
+msgstr "^3quedas^7 Número de bandeiras largadas\n"
#: qcsrc/client/hud/panel/scoreboard.qc:322
msgid "^3lives^7 Number of lives (LMS)\n"
#: qcsrc/client/hud/panel/scoreboard.qc:324
msgid "^3pushes^7 Number of players pushed into void\n"
-msgstr "^3empurrões^7 Número de jogadores empurrados para fora do mapa\n"
+msgstr "^3empurrões^7 Número de jogadores empurrados para o vazio\n"
#: qcsrc/client/hud/panel/scoreboard.qc:325
msgid ""
"^3destroyed^7 Number of keys destroyed by pushing them into "
"void\n"
msgstr ""
-"^3destruídas^7 Número de chaves destruídas ao empurrá-las para fora do mapa\n"
+"^3destruídas^7 Número de chaves destruídas ao empurrá-las para o vazio\n"
#: qcsrc/client/hud/panel/scoreboard.qc:326
msgid "^3kckills^7 Number of keys carrier kills\n"
-msgstr "^3pcvítimas^7 Número de portadores de chaves mortos pelo jogador\n"
+msgstr "^3pcvítimas^7 Número de portadores de chaves aniquilados\n"
#: qcsrc/client/hud/panel/scoreboard.qc:327
msgid "^3losses^7 Number of times a key was lost\n"
#: qcsrc/client/hud/panel/scoreboard.qc:329
msgid "^3time^7 Total time raced (race/cts)\n"
-msgstr "^3tempo^7 Tempo total de corrida (corrida/cts)\n"
+msgstr "^3tempo^7 Tempo total em corridas (corrida/cts)\n"
#: qcsrc/client/hud/panel/scoreboard.qc:330
msgid "^3fastest^7 Time of fastest lap (race/cts)\n"
#: qcsrc/client/hud/panel/scoreboard.qc:333
msgid "^3bckills^7 Number of ball carrier kills\n"
-msgstr "^3pblvítimas^7 Número de portadores de bolas mortos pelo jogador\n"
+msgstr "^3pblvítimas^7 Número de portadores de bolas aniquilados\n"
#: qcsrc/client/hud/panel/scoreboard.qc:334
msgid ""
#: qcsrc/client/hud/panel/vote.qc:24
msgid "^1You must answer before entering hud configure mode\n"
msgstr ""
-"^1Você tem que responder antes de entrar no modo de configuração do HUD\n"
+"^1Você tem que responder antes de entrar no modo de configuração da "
+"interface\n"
#: qcsrc/client/hud/panel/vote.qc:29
msgid "^2Name ^7instead of \"^1Anonymous player^7\" in stats"
#: qcsrc/client/hud/panel/vote.qc:121
msgid "^1Configure the HUD"
-msgstr "^1Configurar o HUD"
+msgstr "^1Configurar a interface"
#: qcsrc/client/hud/panel/vote.qc:125 qcsrc/menu/xonotic/dialog_firstrun.qc:82
#: qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc:18
#: qcsrc/menu/xonotic/dialog_hudsetup_exit.qc:19
msgid "HUD skins"
-msgstr "Visuais de HUD"
+msgstr "Visuais de interface"
#: qcsrc/menu/xonotic/dialog_hudsetup_exit.qc:22
#: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:196
#: qcsrc/menu/xonotic/dialog_hudsetup_exit.qc:93
msgid "HUD Dock:"
-msgstr "Camada do HUD:"
+msgstr "Camada da interface:"
#: qcsrc/menu/xonotic/dialog_hudsetup_exit.qc:95
msgid "DOCK^Disabled"
#: qcsrc/menu/xonotic/dialog_hudsetup_exit.qh:6
msgid "Panel HUD Setup"
-msgstr "Painel de Configuração do HUD"
+msgstr "Painel de configuração da interface"
#: qcsrc/menu/xonotic/dialog_monstertools.qc:13
msgid "Monster:"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:160
msgid "Dynamic HUD"
-msgstr "HUD dinâmico"
+msgstr "Interface dinâmica"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:161
msgid "HUD moves around following player's movement"
-msgstr "O HUD se move de acordo com o movimento do jogador"
+msgstr "A interface se move de acordo com o movimento do jogador"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:163
msgid "Shake the HUD when hurt"
-msgstr "Vibrar o HUD ao ser atingido"
+msgstr "Vibrar a interface ao receber dano"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:167
#: qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qh:6
msgid "Enter HUD editor"
-msgstr "Entrar no editor do HUD"
+msgstr "Entrar no editor de interface"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qh:7
msgid "HUD"
-msgstr "HUD"
+msgstr "Interface"
#: qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc:21
msgid "In order for the HUD editor to show, you must first be in game."
-msgstr "Para o editor do HUD aparecer, é necessário estar jogando em um mapa."
+msgstr ""
+"Para abrir o editor de interface, é necessário estar jogando em um mapa."
#: qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc:23
msgid "Do you wish to start a local game to set up the HUD?"
-msgstr "Quer iniciar um jogo local para personalizar o HUD?"
+msgstr "Quer iniciar um jogo local para personalizar a interface?"
#: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:24
msgid "Frag Information"
#: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:101
msgid "Killstreak sounds"
-msgstr "Sons de sequências de mortes"
+msgstr "Sons de sequência de mortes"
#: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:104
msgid "Achievement sounds"
seta notification_INFO_ITEM_WEAPON_UNAVAILABLE "0" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_JETPACK_NOFUEL "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_JOIN_CONNECT "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-seta notification_INFO_JOIN_CONNECT_TEAM "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_JOIN_PLAY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_JOIN_PLAY_TEAM "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_KEEPAWAY_DROPPED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
float autocvar_cl_effects_lightningarc_drift_start;
float autocvar_cl_effects_lightningarc_segmentlength;
bool autocvar_cl_effects_lightningarc_simple;
-int autocvar_cl_gentle;
+bool autocvar_cl_gentle;
int autocvar_cl_gentle_damage;
int autocvar_cl_gentle_gibs;
int autocvar_cl_gentle_messages;
float autocvar_cl_gibs_damageforcescale = 3.5;
float autocvar_cl_gibs_lifetime = 14;
-float autocvar_cl_gibs_maxcount = 100;
+int autocvar_cl_gibs_maxcount = 100;
bool autocvar_cl_gibs_sloppy = 1;
float autocvar_cl_gibs_ticrate = 0.1;
float autocvar_cl_gibs_velocity_random = 1;
float autocvar_menu_mouse_speed;
string autocvar_menu_skin;
int autocvar_r_fakelight;
-int autocvar_r_fullbright;
+bool autocvar_r_fullbright;
float autocvar_r_letterbox;
string autocvar_scoreboard_columns;
bool autocvar_v_flipped;
-float autocvar_vid_conheight;
-float autocvar_vid_conwidth;
+int autocvar_vid_conheight;
+int autocvar_vid_conwidth;
float autocvar_vid_pixelheight;
float autocvar_viewsize;
bool autocvar_cl_eventchase_vehicle = 1;
float scoreboard_showscores;
float scoreboard_showaccuracy;
.string message;
-.int renderflags;
+.float renderflags;
// float coop;
// float deathmatch;
// Darkplaces Render Modifications
#if 0
.float alpha;
-.float renderflags;
.vector colormod;
.float scale;
#endif
while((s = fgets(fh)) && QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES)
{
// first skip invalid entries, so we don't check them anymore
- float argc;
+ int argc;
argc = tokenize_console(s);
if(argc == 0 || argv(0) == "")
continue;
bool scoreboard_active;
float scoreboard_fade_alpha;
-void Cmd_Scoreboard_SetFields(float argc);
+void Cmd_Scoreboard_SetFields(int argc);
void Scoreboard_Draw();
void Scoreboard_InitScores();
void Scoreboard_UpdatePlayerTeams();
}
.float has_team;
-float SetTeam(entity o, int Team)
+bool SetTeam(entity o, int Team)
{
TC(int, Team);
devassert_once(Team);
{
for(j = 0; j < maxclients; ++j)
if(playerslots[j])
- playerslots[j].ready = 1;
+ playerslots[j].ready = true;
for(i = 1; i <= maxclients; i += 8)
{
f = ReadByte();
for(j = i-1, b = BIT(0); b < BIT(8); b <<= 1, ++j)
if (!(f & b))
if(playerslots[j])
- playerslots[j].ready = 0;
+ playerslots[j].ready = false;
}
}
if (sf & 1) {
for (int j = 0; j < maxclients; ++j) {
if (playerslots[j]) {
- playerslots[j].eliminated = 1;
+ playerslots[j].eliminated = true;
}
}
for (int i = 1; i <= maxclients; i += 8) {
if (f & BIT(b)) continue;
int j = i - 1 + b;
if (playerslots[j]) {
- playerslots[j].eliminated = 0;
+ playerslots[j].eliminated = false;
}
}
}
// Minimap
string minimapname;
-float postinit;
+bool postinit;
entity gametype;
float FONT_USER = 8;
void Gamemode_Init();
-float SetTeam(entity pl, float Team);
+bool SetTeam(entity pl, int Team);
vector hud_fontsize;
entity playerslots[255]; // 255 is engine limit on maxclients
entity teamslots[17]; // 17 teams (including "spectator team")
-.float gotscores;
+.bool gotscores;
.entity owner;
-.float ready;
-.float eliminated;
+.bool ready;
+.bool eliminated;
.void(entity) draw;
IntrusiveList g_drawables;
float current_viewzoom;
float zoomin_effect;
-float warmup_stage;
+bool warmup_stage;
void Fog_Force();
#define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
string vote_called_vote;
-float ready_waiting;
-float ready_waiting_for_me;
-float vote_waiting;
-float vote_waiting_for_me;
+bool ready_waiting;
+bool ready_waiting_for_me;
+bool vote_waiting;
+bool vote_waiting_for_me;
float current_zoomfraction;
-float cs_project_is_b0rked;
-float vid_width, vid_height, vid_pixelheight;
+int cs_project_is_b0rked;
+int vid_width, vid_height;
+float vid_pixelheight;
float camera_active; // Demo camera is active if set to true
float chase_active_backup;
#include <common/constants.qh>
void MapVote_Draw();
-void Cmd_MapVote_MapDownload(float argc);
+void Cmd_MapVote_MapDownload(int argc);
float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary);
// Sets up the campaign for the n-th array item (meaning: campaign_offset+nth
// level) using localcmd()
-void CampaignSetup(float n);
+void CampaignSetup(int n);
a = ""; \
else \
++i
-// What you're seeing here is what people will do when your compiler supports
-// C-style macros but no line continuations.
i = -1; // starts at -1 so I don't need postincrement; that is, i points to BEFORE the current arg!
CAMPAIGN_GETARG; campaign_gametype[campaign_entries] = strzone(a);
// Command Sub-Functions
// =======================
-void GenericCommand_addtolist(float request, float argc)
+void GenericCommand_addtolist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_qc_curl(float request, float argc)
+void GenericCommand_qc_curl(int request, int argc)
{
switch(request)
{
}
}
-GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to *_cmd_dump.txt")
+GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt")
{
switch(request)
{
#ifdef SVQC
CMD_Write("dump of server console commands:\n");
GameCommand_macro_write_aliases(fh);
+ CMD_Write("\n");
- CMD_Write("\ndump of networked client only commands:\n");
+ CMD_Write("dump of networked client only commands:\n");
ClientCommand_macro_write_aliases(fh);
+ CMD_Write("\n");
- CMD_Write("\ndump of common commands:\n");
+ CMD_Write("dump of common commands:\n");
CommonCommand_macro_write_aliases(fh);
+ CMD_Write("\n");
- CMD_Write("\ndump of ban commands:\n");
+ CMD_Write("dump of ban commands:\n");
BanCommand_macro_write_aliases(fh);
+ CMD_Write("\n");
#endif
#ifdef CSQC
CMD_Write("dump of client commands:\n");
LocalCommand_macro_write_aliases(fh);
+ CMD_Write("\n");
#endif
- CMD_Write("\ndump of generic commands:\n");
+ CMD_Write("dump of generic commands:\n");
GenericCommand_macro_write_aliases(fh);
LOG_INFO("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.");
}
}
-void GenericCommand_maplist(float request, float argc)
+void GenericCommand_maplist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_nextframe(float request, float arguments, string command)
+void GenericCommand_nextframe(int request, float arguments, string command)
{
switch(request)
{
}
}
-void GenericCommand_removefromlist(float request, float argc)
+void GenericCommand_removefromlist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_restartnotifs(float request)
+void GenericCommand_restartnotifs(int request)
{
switch(request)
{
}
}
-void GenericCommand_settemp(float request, float argc)
+void GenericCommand_settemp(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_settemp_restore(float request, float argc)
+void GenericCommand_settemp_restore(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_runtest(float request, float argc)
+void GenericCommand_runtest(int request, int argc)
{
switch(request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GenericCommand_(float request)
+void GenericCommand_(int request)
{
switch(request)
{
FOREACH(GENERIC_COMMANDS, true, LOG_INFOF(" ^2%s^7: %s", it.m_name, it.m_description));
}
-float GenericCommand_macro_command(float argc, string command)
+float GenericCommand_macro_command(int argc, string command)
{
string c = strtolower(argv(0));
FOREACH(GENERIC_COMMANDS, it.m_name == c, {
return false;
}
-float GenericCommand_macro_usage(float argc)
+float GenericCommand_macro_usage(int argc)
{
string c = strtolower(argv(1));
FOREACH(GENERIC_COMMANDS, it.m_name == c, {
float GenericCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
float n, j, f, i;
string s, s2, c;
vector rgb;
void GenericCommand_macro_help();
-float GenericCommand_macro_command(float argc, string command);
+float GenericCommand_macro_command(int argc, string command);
-float GenericCommand_macro_usage(float argc);
+float GenericCommand_macro_usage(int argc);
void GenericCommand_macro_write_aliases(float fh);
void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
-void GenericCommand_rpn(float request, float argc, string command)
+void GenericCommand_rpn(int request, int argc, string command)
{
switch(request)
{
int rpn_sp;
string rpn_stack[MAX_RPN_STACK];
-void GenericCommand_rpn(float request, float argc, string command);
+void GenericCommand_rpn(int request, int argc, string command);
it.debug_trace_button = btn;
if (!btn || skip) continue;
FOREACH_ENTITY(true, {
- it.solid_prev = it.solid;
+ it.solid_prev = it.solid;
it.solid = SOLID_BBOX;
});
vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
vector pos = it.origin + it.view_ofs;
traceline(pos, pos + forward * max_shot_distance, MOVE_NORMAL, it);
FOREACH_ENTITY(true, {
- it.solid = it.solid_prev;
- it.solid_prev = 0;
+ it.solid = it.solid_prev;
+ it.solid_prev = 0;
});
entity e = trace_ent;
int i = etof(e);
flag.netname = strzone(sprintf("%s%s^7 flag", Team_ColorCode(teamnumber), Team_ColorName_Upper(teamnumber)));
flag.team = teamnumber;
flag.classname = "item_flag_team";
- flag.target = "###item###"; // wut?
+ flag.target = "###item###"; // for finding the nearest item using findnearest
flag.flags = FL_ITEM | FL_NOTARGET;
IL_PUSH(g_items, flag);
flag.solid = SOLID_TRIGGER;
return -1; // no control points left?
}
-float Domination_CheckWinner()
+bool Domination_CheckWinner()
{
if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
{
game_stopped = true;
round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
- return 1;
+ return true;
}
Domination_count_controlpoints();
float winner_team = Domination_GetWinnerTeam();
if(winner_team == -1)
- return 0;
+ return false;
if(winner_team > 0)
{
game_stopped = true;
round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
- return 1;
+ return true;
}
-float Domination_CheckPlayers()
+bool Domination_CheckPlayers()
{
- return 1;
+ return true;
}
void Domination_RoundStart()
#define FREEZETAG_ALIVE_TEAMS_OK() (Team_GetNumberOfAliveTeams() == NumTeams(freezetag_teams))
-float freezetag_CheckTeams()
+bool freezetag_CheckTeams()
{
static float prev_missing_teams_mask;
if(FREEZETAG_ALIVE_TEAMS_OK())
if(prev_missing_teams_mask > 0)
Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
- return 1;
+ return true;
}
if(total_players == 0)
{
if(prev_missing_teams_mask > 0)
Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
- return 0;
+ return false;
}
int missing_teams_mask = 0;
for (int i = 1; i <= NUM_TEAMS; ++i)
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
prev_missing_teams_mask = missing_teams_mask;
}
- return 0;
+ return false;
}
int freezetag_getWinnerTeam()
void nades_Clear(entity);
void nades_GiveBonus(entity player, float score);
-float freezetag_CheckWinner()
+bool freezetag_CheckWinner()
{
if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
{
});
game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
- return 1;
+ return true;
}
if (Team_GetNumberOfAliveTeams() > 1)
{
- return 0;
+ return false;
}
int winner_team = freezetag_getWinnerTeam();
game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
- return 1;
+ return true;
}
entity freezetag_LastPlayerForTeam(entity this)
freezetag_Add_Score(targ, attacker);
}
-float freezetag_isEliminated(entity e)
+bool freezetag_isEliminated(entity e)
{
if(IS_PLAYER(e) && (STAT(FROZEN, e) == 1 || IS_DEAD(e)))
return true;
void ka_TouchEvent(entity this, entity toucher) // runs any time that the ball comes in contact with something
{
- if(game_stopped) return;
- if(!this) return;
+ if (!this || game_stopped)
+ return;
+
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
{ // The ball fell off the map, respawn it since players can't get to it
ka_RespawnBall(this);
WaypointSprite_Kill(this.waypointsprite_attachedforcarrier);
}
+void ka_PlayerReset(entity plyr)
+{
+ plyr.ballcarried = NULL;
+ GameRules_scoring_vip(plyr, false);
+ WaypointSprite_Kill(plyr.waypointsprite_attachedforcarrier);
+
+ // reset the player effects
+ plyr.glow_trail = false;
+ plyr.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
+}
+
void ka_DropEvent(entity plyr) // runs any time that a player is supposed to lose the ball
{
entity ball;
ball.effects &= ~EF_NODRAW;
setorigin(ball, plyr.origin + '0 0 10');
ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom();
- entity e = ball.owner;
ball.owner = NULL;
- e.ballcarried = NULL;
- GameRules_scoring_vip(e, false);
- navigation_dynamicgoal_set(ball, e);
-
- // reset the player effects
- plyr.glow_trail = false;
- plyr.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
+ navigation_dynamicgoal_set(ball, plyr);
// messages and sounds
ka_EventLog("dropped", plyr);
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname);
sound(NULL, CH_TRIGGER, SND_KA_DROPPED, VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
- // scoring
- // GameRules_scoring_add(plyr, KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
-
// waypoints
WaypointSprite_Spawn(WP_KaBall, 0, 0, ball, '0 0 64', NULL, ball.team, ball, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER);
WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
WaypointSprite_Ping(ball.waypointsprite_attachedforcarrier);
- WaypointSprite_Kill(plyr.waypointsprite_attachedforcarrier);
+
+ ka_PlayerReset(plyr);
}
-/** used to clear the ballcarrier whenever the match switches from warmup to normal */
-void ka_Reset(entity this)
+.bool pushable;
+
+MODEL(KA_BALL, "models/orbs/orbblue.md3");
+
+void ka_RemoveBall()
+{
+ entity plyr = ka_ball.owner;
+ if (plyr) // it was attached
+ ka_PlayerReset(plyr);
+ else
+ WaypointSprite_DetachCarrier(ka_ball);
+ delete(ka_ball);
+ ka_ball = NULL;
+}
+
+void ka_SpawnBall()
{
- if((this.owner) && (IS_PLAYER(this.owner)))
- ka_DropEvent(this.owner);
+ entity e = new(keepawayball);
+ setmodel(e, MDL_KA_BALL);
+ setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
+ e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
+ e.takedamage = DAMAGE_YES;
+ e.solid = SOLID_TRIGGER;
+ set_movetype(e, MOVETYPE_BOUNCE);
+ e.glow_color = autocvar_g_keepawayball_trail_color;
+ e.glow_trail = true;
+ e.flags = FL_ITEM;
+ IL_PUSH(g_items, e);
+ e.pushable = true;
+ settouch(e, ka_TouchEvent);
+ e.owner = NULL;
+ ka_ball = e;
+ navigation_dynamicgoal_init(ka_ball, false);
+ InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
+}
+
+void ka_Handler_CheckBall(entity this)
+{
if(time < game_starttime)
{
- setthink(this, ka_RespawnBall);
- settouch(this, func_null);
- this.nextthink = game_starttime;
+ if (ka_ball)
+ ka_RemoveBall();
}
else
- ka_RespawnBall(this);
+ {
+ if (!ka_ball)
+ ka_SpawnBall();
+ }
+
+ this.nextthink = time;
+}
+
+void ka_Initialize() // run at the start of a match, initiates game mode
+{
+ ka_Handler = new(ka_Handler);
+ setthink(ka_Handler, ka_Handler_CheckBall);
+ ka_Handler.nextthink = time;
}
ka_DropEvent(frag_target);
}
-.bool pushable;
-
-// ==============
-// Initialization
-// ==============
-
-MODEL(KA_BALL, "models/orbs/orbblue.md3");
-
-void ka_SpawnBall() // loads various values for the ball, runs only once at start of match
-{
- entity e = new(keepawayball);
- setmodel(e, MDL_KA_BALL);
- setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
- e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
- e.takedamage = DAMAGE_YES;
- e.solid = SOLID_TRIGGER;
- set_movetype(e, MOVETYPE_BOUNCE);
- e.glow_color = autocvar_g_keepawayball_trail_color;
- e.glow_trail = true;
- e.flags = FL_ITEM;
- IL_PUSH(g_items, e);
- e.pushable = true;
- e.reset = ka_Reset;
- settouch(e, ka_TouchEvent);
- e.owner = NULL;
- ka_ball = e;
- navigation_dynamicgoal_init(ka_ball, false);
-
- InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
-}
-
-void ka_Initialize() // run at the start of a match, initiates game mode
-{
- ka_SpawnBall();
-}
#endif
entity ka_ball;
+entity ka_Handler;
void(entity this) havocbot_role_ka_carrier;
void(entity this) havocbot_role_ka_collector;
.float strength_finished = _STAT(STRENGTH_FINISHED);
.float invincible_finished = _STAT(INVINCIBLE_FINISHED);
+#define spawnfunc_body(item) \
+ if (!Item_IsDefinitionAllowed(item)) \
+ { \
+ startitem_failed = true; \
+ delete(this); \
+ return; \
+ } \
+ StartItem(this, item)
+
#define SPAWNFUNC_ITEM(name, item) \
- spawnfunc(name) \
+ spawnfunc(name) \
+ { \
+ spawnfunc_body(item); \
+ }
+
+#define SPAWNFUNC_ITEM_COND(name, cond, item1, item2) \
+ spawnfunc(name) \
{ \
- if (!Item_IsDefinitionAllowed(item)) \
- { \
- startitem_failed = true; \
- delete(this); \
- return; \
- } \
- StartItem(this, item); \
+ entity item = (cond) ? item1 : item2; \
+ spawnfunc_body(item); \
}
#else
{
ITEM_FLAG_NORMAL = BIT(0), ///< Item is usable during normal gameplay.
ITEM_FLAG_MUTATORBLOCKED = BIT(1),
- ITEM_FLAG_RESOURCE = BIT(2) ///< Item is is a resource, not a held item.
+ ITEM_FLAG_RESOURCE = BIT(2) ///< Item is is a resource, not a held item.
};
#define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__)
classfield(Wall) .vector saved;
// Needed for interactive clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
.float alpha_max, alpha_min;
// If fade_start > fade_end, fadeout will be inverted
// fade_vertical_offset is a vertival offset for player position
STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); }
.float pushltime;
-.float istypefrag;
+.bool istypefrag;
.float height;
const int NUM_JUMPPADSUSED = 3;
entity sandbox_ObjectPort_Load(entity this, string s, float database)
{
// load object properties, and spawn a new object with them
- float n, i;
+ int n, i;
entity e = NULL, parent = NULL;
+ string arg = string_null;
// separate objects between the ; symbols
n = tokenizebyseparator(s, "; ");
// now separate and apply the properties of each object
for(i = 0; i < n; ++i)
{
- float argv_num;
+ #define SANDBOX_GETARG arg = argv(++argv_num);
+ int argv_num = -1; // starts at -1 so I don't need postincrement
+
string tagname = string_null;
- argv_num = 0;
tokenize_console(port_string[i]);
e = sandbox_ObjectSpawn(this, database);
if(i)
{
// properties stored only for child objects
- if(argv(argv_num) != "") tagname = argv(argv_num); else tagname = string_null; ++argv_num;
+ SANDBOX_GETARG; tagname = (arg != "") ? arg : string_null;
}
else
{
// properties stored only for parent objects
if(database)
{
- setorigin(e, stov(argv(argv_num))); ++argv_num;
- e.angles = stov(argv(argv_num)); ++argv_num;
+ SANDBOX_GETARG; setorigin(e, stov(arg));
+ SANDBOX_GETARG; e.angles = stov(arg);
}
parent = e; // mark parent objects as such
}
// properties stored for all objects
- _setmodel(e, argv(argv_num)); ++argv_num;
- e.skin = stof(argv(argv_num)); ++argv_num;
- e.alpha = stof(argv(argv_num)); ++argv_num;
- e.colormod = stov(argv(argv_num)); ++argv_num;
- e.glowmod = stov(argv(argv_num)); ++argv_num;
- e.frame = stof(argv(argv_num)); ++argv_num;
- sandbox_ObjectEdit_Scale(e, stof(argv(argv_num))); ++argv_num;
- e.solid = e.old_solid = stof(argv(argv_num)); ++argv_num;
- e.old_movetype = stof(argv(argv_num)); ++argv_num;
+ SANDBOX_GETARG; _setmodel(e, arg);
+ SANDBOX_GETARG; e.skin = stof(arg);
+ SANDBOX_GETARG; e.alpha = stof(arg);
+ SANDBOX_GETARG; e.colormod = stov(arg);
+ SANDBOX_GETARG; e.glowmod = stov(arg);
+ SANDBOX_GETARG; e.frame = stof(arg);
+ SANDBOX_GETARG; sandbox_ObjectEdit_Scale(e, stof(arg));
+ SANDBOX_GETARG; e.solid = e.old_solid = stof(arg);
+ SANDBOX_GETARG; e.old_movetype = stof(arg);
set_movetype(e, e.old_movetype);
- e.damageforcescale = stof(argv(argv_num)); ++argv_num;
- strfree(e.material); if(argv(argv_num) != "") e.material = strzone(argv(argv_num)); else e.material = string_null; ++argv_num;
+ SANDBOX_GETARG; e.damageforcescale = stof(arg);
+ strfree(e.material);
+ SANDBOX_GETARG; e.material = (arg != "") ? strzone(arg) : string_null;
if(database)
{
// properties stored only for the database
- strfree(e.crypto_idfp); if(argv(argv_num) != "") e.crypto_idfp = strzone(argv(argv_num)); else e.crypto_idfp = string_null; ++argv_num;
- strcpy(e.netname, argv(argv_num)); ++argv_num;
- strcpy(e.message, argv(argv_num)); ++argv_num;
- strcpy(e.message2, argv(argv_num)); ++argv_num;
+ strfree(e.crypto_idfp);
+ SANDBOX_GETARG; e.crypto_idfp = (arg != "") ? strzone(arg) : string_null;
+ SANDBOX_GETARG; strcpy(e.netname, arg);
+ SANDBOX_GETARG; strcpy(e.message, arg);
+ SANDBOX_GETARG; strcpy(e.message2, arg);
}
// attach last
thehook.owner.damage_dealt += autocvar_g_vampirehook_damage;
Damage(dmgent, thehook, thehook.owner, autocvar_g_vampirehook_damage, WEP_HOOK.m_id, DMG_NOWEP, thehook.origin, '0 0 0');
entity targ = ((SAME_TEAM(thehook.owner, thehook.aiment)) ? thehook.aiment : thehook.owner);
- Heal(targ, thehook.owner, autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max);
+ // TODO: we can't do this due to an issue with globals and the mutator arguments
+ //Heal(targ, thehook.owner, autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max);
+ SetResourceAmountExplicit(targ, RESOURCE_HEALTH, min(GetResourceAmount(targ, RESOURCE_HEALTH) + autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max));
if(dmgent == thehook.owner)
TakeResource(dmgent, RESOURCE_HEALTH, autocvar_g_vampirehook_damage); // FIXME: friendly fire?!
REGISTER_WAYPOINT(RaceStart, _("Start"), "", '1 0.5 0', 1);
REGISTER_WAYPOINT(RaceStartFinish, _("Start"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(AssaultDefend, _("Defend"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(AssaultDefend, _("Defend"), "as_defend", '1 0.5 0', 1);
+REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), "as_destroy", '1 0.5 0', 1);
REGISTER_WAYPOINT(AssaultPush, _("Push"), "", '1 0.5 0', 1);
REGISTER_WAYPOINT(FlagCarrier, _("Flag carrier"), "", '0.8 0.8 0', 1);
LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
}
- if (time - floor(time) > 0.5)
+ float health_val = GetResourceAmount(this, RESOURCE_HEALTH);
+ float blink_time = (health_val >= 0) ? (health_val * 10) : time;
+ if (blink_time - floor(blink_time) > 0.5)
{
if (this.helpme && time < this.helpme)
a *= SPRITE_HELPME_BLINK;
- else if (this.lifetime > 0) // fading out waypoints don't blink
+ else if (!this.lifetime) // fading out waypoints don't blink
a *= spritelookupblinkvalue(this, spriteimage);
}
ang += M_PI;
float f1 = d.x / vid_conwidth;
- float f2 = d.y / vid_conheight;
+ float f2 = d.y / vid_conheight;
if (f1 == 0) { f1 = 0.000001; }
if (f2 == 0) { f2 = 0.000001; }
entity WaypointSprite_DeployFixed(
entity spr,
- float limited_range,
+ bool limited_range,
entity player,
vector ofs,
entity icon // initial icon
entity WaypointSprite_Attach(
entity spr,
entity player,
- float limited_range,
+ bool limited_range,
entity icon // initial icon
)
{
.entity waypointsprite_deployed_fixed;
entity WaypointSprite_DeployFixed(
entity spr,
- float limited_range,
+ bool limited_range,
entity player,
vector ofs,
entity icon // initial icon
entity WaypointSprite_Attach(
entity spr,
entity player,
- float limited_range,
+ bool limited_range,
entity icon // initial icon
);
MSG_INFO_NOTIF(CONNECTING, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^BG is connecting..."), "")
MSG_INFO_NOTIF(JOIN_CONNECT, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 connected"), "")
- MULTITEAM_INFO(JOIN_CONNECT_TEAM, 4, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 connected and joined the ^TC^TT team"), "", NAME)
MSG_INFO_NOTIF(JOIN_PLAY, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing"), "")
MULTITEAM_INFO(JOIN_PLAY_TEAM, 4, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing on the ^TC^TT team"), "", NAME)
return false;
if(this.waterlevel >= WATERLEVEL_SWIMMING)
return false;
- traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
+ tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 24', MOVE_NORMAL, this);
+ //traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
if(trace_fraction < 1)
return false;
return true;
.float swamp_slowdown;
.float lastflags;
.float lastground;
-.float wasFlying;
+.bool wasFlying;
.int buttons_old;
.vector movement_old;
}
}
-void PlayerStats_GameReport_AddTeam(float t)
+void PlayerStats_GameReport_AddTeam(int t)
{
if(PS_GR_OUT_DB < 0) { return; }
strfree(p.playerstats_id);
}
-void PlayerStats_GameReport(float finished)
+void PlayerStats_GameReport(bool finished)
{
if(PS_GR_OUT_DB < 0) { return; }
const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
// delay map switch until this is set
-float PlayerStats_GameReport_DelayMapVote;
+bool PlayerStats_GameReport_DelayMapVote;
// call at initialization
void PlayerStats_GameReport_Init();
entcs_attach(this);
anticheat_init(this);
W_HitPlotOpen(this);
-
- bot_clientconnect(this);
}
void bot_clientdisconnect(entity this);
return true;
}
-void Item_Show (entity e, float mode)
+void Item_Show (entity e, int mode)
{
e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST);
e.ItemStatus &= ~ITS_STAYWEP;
|| (def.instanceOfHealth && def != ITEM_HealthSmall)
|| (def.instanceOfArmor && def != ITEM_ArmorSmall)
|| (itemid & (IT_KEY1 | IT_KEY2))
- ) this.target = "###item###"; // for finding the nearest item using find()
+ ) this.target = "###item###"; // for finding the nearest item using findnearest
Item_ItemsTime_SetTime(this, 0);
}
.float item_respawncounter;
-void Item_Show (entity e, float mode);
+void Item_Show (entity e, int mode);
void Item_Respawn (entity this);
float ammo_pickupevalfunc(entity player, entity item);
float healtharmor_pickupevalfunc(entity player, entity item);
-.float is_item;
+.bool is_item;
.entity itemdef;
void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter);
const string STATIC_NAME_TEAM_4 = "Pink";
#ifdef CSQC
-float teamplay;
-float myteam;
+bool teamplay;
+int myteam;
#endif
-string Team_ColorCode(float teamid)
+string Team_ColorCode(int teamid)
{
switch(teamid)
{
return "^7";
}
-vector Team_ColorRGB(float teamid)
+vector Team_ColorRGB(int teamid)
{
switch(teamid)
{
return '0 0 0';
}
-string Team_ColorName(float teamid)
+string Team_ColorName(int teamid)
{
switch(teamid)
{
}
// used for replacement in filenames or such where the name CANNOT be allowed to be translated
-string Static_Team_ColorName(float teamid)
+string Static_Team_ColorName(int teamid)
{
switch(teamid)
{
// loadable hagar secondary attack, must always run each frame
if(time < game_starttime || time < actor.race_penalty || timeout_status == TIMEOUT_ACTIVE)
return;
+ if (round_handler_IsActive() && !round_handler_IsRoundStarted())
+ return;
bool loaded = actor.(weaponentity).hagar_load >= WEP_CVAR_SEC(hagar, load_max);
LOG_INFO(_(" sync - reloads all cvars on the current menu page"));
LOG_INFO(_(" directmenu ITEM - select a menu item as main item"));
LOG_INFO(_(" dumptree - dump the state of the menu as a tree to the console"));
+ LOG_INFO("\n");
LOG_INFO("Generic commands shared by all programs:");
GenericCommand_macro_help();
}
}
AUTOCVAR(menu_scroll_averaging_time, float, 0.16, "smooth scroll averaging time");
-// scroll faster while dragging the scrollbar
+ // scroll faster while dragging the scrollbar
AUTOCVAR(menu_scroll_averaging_time_pressed, float, 0.06, "smooth scroll averaging time when dragging the scrollbar");
void ListBox_draw(entity me)
{
if (me.scrollPos != me.scrollPosTarget)
{
float averaging_time = (me.pressed == 1)
- ? autocvar_menu_scroll_averaging_time_pressed
+ ? autocvar_menu_scroll_averaging_time_pressed
: autocvar_menu_scroll_averaging_time;
// this formula works with whatever framerate
float f = averaging_time ? exp(-frametime / averaging_time) : 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticCampaignList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * me.realFontSize.y;
me.realUpperMargin2 = me.realUpperMargin1 + 2 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticDemoList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox"), "-"));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_INFO_QUIT_DISCONNECT", _("Display player statuses in the chatbox"), "-"));
- makeMulti(e, "notification_INFO_QUIT_KICK_IDLING notification_INFO_JOIN_CONNECT_TEAM");
+ makeMulti(e, "notification_INFO_QUIT_KICK_IDLING notification_INFO_JOIN_CONNECT");
me.TR(me);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications"), "-"));
me.itemAbsSize = '0 0 0';
SUPER(XonoticGametypeList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnIconOrigin = 0;
me.columnIconSize = me.itemAbsSize.y / me.itemAbsSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticHUDSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticPlayerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
// this list does 1 char left and right margin
me.itemAbsSize = '0 0 0';
SUPER(XonoticPlayList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNumberOrigin = 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticScreenshotList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNameOrigin = me.realFontSize.x;
me.itemAbsSize = '0 0 0';
SUPER(XonoticSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
me.itemAbsSize = '0 0 0';
SUPER(XonoticSoundList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
me.columnNumberOrigin = 0;
me.itemAbsSize = '0 0 0';
SUPER(XonoticStatsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
#if 0
this.bot_config_loaded = true;
- // this is really only a default, JoinBestTeam is called later
+ // this is really only a default, TeamBalance_JoinBestTeam is called later
setcolor(this, stof(bot_shirt) * 16 + stof(bot_pants));
this.bot_preferredcolors = this.clientcolors;
else if(this.bot_forced_team==4)
this.team = NUM_TEAM_4;
else
- TeamBalance_JoinBestTeam(this, true);
+ TeamBalance_JoinBestTeam(this);
havocbot_setupbot(this);
}
const int AI_STATUS_JETPACK_LANDING = BIT(10);
const int AI_STATUS_STUCK = BIT(11); // Cannot reach any goal
-.float isbot; // true if this client is actually a bot
+.bool isbot; // true if this client is actually a bot
.int aistatus;
// Skill system
{
vector item_org = (it.absmin + it.absmax) * 0.5;
item_org.z = it.absmin.z - PL_MIN_CONST.z;
- if(vlen(item_org - org) < 30)
+ if (vlen(item_org - org) < 20)
{
org = item_org;
break;
void waypoint_remove(entity wp)
{
- // tell all waypoints linked to wp that they need to relink
IL_EACH(g_waypoints, it != wp,
{
if (waypoint_islinked(it, wp))
bool parse_comments = true;
float ver = 0;
+ string links_time = string_null;
while ((s = fgets(file)))
{
{
if(substring(s, 2, 17) == "WAYPOINT_VERSION ")
ver = stof(substring(s, 19, -1));
+ else if(substring(s, 2, 14) == "WAYPOINT_TIME ")
+ links_time = substring(s, 16, -1);
continue;
}
else
{
- if(ver < WAYPOINT_VERSION)
+ if(ver < WAYPOINT_VERSION || links_time != waypoint_time)
{
- LOG_TRACE("waypoint links for this map are outdated.");
+ if (links_time != waypoint_time)
+ LOG_TRACE("waypoint links for this map are not made for these waypoints.");
+ else
+ LOG_TRACE("waypoint links for this map are outdated.");
if (g_assault)
{
LOG_TRACE("Assault waypoint links need to be manually updated in the editor");
}
fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
+ if (waypoint_time != "")
+ fputs(file, strcat("//", "WAYPOINT_TIME ", waypoint_time, "\n"));
int c = 0;
IL_EACH(g_waypoints, true,
// (they are read as a waypoint with origin '0 0 0' and flag 0 though)
fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
fputs(file, strcat("//", "WAYPOINT_SYMMETRY ", sym_str, "\n"));
- fputs(file, strcat("//", "\n"));
+
+ strcpy(waypoint_time, strftime(true, "%Y-%m-%d %H:%M:%S"));
+ fputs(file, strcat("//", "WAYPOINT_TIME ", waypoint_time, "\n"));
+ //fputs(file, strcat("//", "\n"));
+ //fputs(file, strcat("//", "\n"));
+ //fputs(file, strcat("//", "\n"));
int c = 0;
IL_EACH(g_waypoints, true,
if (tokens > 2) { sym_param2 = stof(argv(2)); }
if (tokens > 3) { sym_param3 = stof(argv(3)); }
}
+ else if(substring(s, 2, 14) == "WAYPOINT_TIME ")
+ strcpy(waypoint_time, substring(s, 16, -1));
continue;
}
else
// increase by 0.01 when changes require only waypoint relinking
// increase by 1 when changes require to manually edit waypoints
// max 2 decimal places, always specified
-#define WAYPOINT_VERSION 1.01
+const float WAYPOINT_VERSION = 1.01;
+string waypoint_time;
// fields you can query using prvm_global server to get some statistics about waypoint linking culling
float relink_total, relink_walkculled, relink_pvsculled, relink_lengthculled;
#else
-.float maycheat;
+.bool maycheat;
float gamestart_sv_cheats;
{
}
-float CheatsAllowed(entity this, float i, float argc, float fr) // the cheat gets passed as argument for possible future ACL checking
+float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets passed as argument for possible future ACL checking
{
// dead people cannot cheat
if(IS_DEAD(this))
accuracy_resend(this);
if (this.team < 0)
- TeamBalance_JoinBestTeam(this, true);
+ TeamBalance_JoinBestTeam(this);
entity spot = SelectSpawnPoint(this, false);
if (!spot) {
{
if(this.killindicator_teamchange == -1)
{
- TeamBalance_JoinBestTeam(this, true);
+ TeamBalance_JoinBestTeam(this);
}
else if(this.killindicator_teamchange == -2)
{
TRANSMUTE(Client, this);
CS(this).version_nagtime = time + 10 + random() * 10;
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_CONNECT, this.netname);
+
+ bot_clientconnect(this);
+
// identify the right forced team
if (autocvar_g_campaign)
{
}
if (!teamplay && this.team_forced > 0) this.team_forced = 0;
- int playerid_save = this.playerid;
- this.playerid = 0; // silent
- TeamBalance_JoinBestTeam(this, false); // if the team number is valid, keep it
- this.playerid = playerid_save;
-
TRANSMUTE(Observer, this);
PlayerStats_GameReport_AddEvent(sprintf("kills-%d", this.playerid));
if (autocvar_sv_eventlog)
GameLogEcho(strcat(":join:", ftos(this.playerid), ":", ftos(etof(this)), ":", ((IS_REAL_CLIENT(this)) ? this.netaddress : "bot"), ":", playername(this, false)));
- LogTeamchange(this.playerid, this.team, TEAM_CHANGE_CONNECT);
-
CS(this).just_joined = true; // stop spamming the eventlog with additional lines when the client connects
- if(teamplay && IS_PLAYER(this))
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_JOIN_CONNECT_TEAM), this.netname);
- else
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_CONNECT, this.netname);
-
stuffcmd(this, clientstuff, "\n");
stuffcmd(this, "cl_particles_reloadeffects\n"); // TODO do we still need this?
if(!this.team_selected)
if(autocvar_g_campaign || autocvar_g_balance_teams)
- TeamBalance_JoinBestTeam(this, true);
+ TeamBalance_JoinBestTeam(this);
if(autocvar_g_campaign)
campaign_bots_may_start = true;
// Last updated: December 29th, 2011
// =====================================================
-void BanCommand_ban(float request, float argc, string command)
+void BanCommand_ban(int request, int argc, string command)
{
switch (request)
{
}
}
-void BanCommand_banlist(float request)
+void BanCommand_banlist(int request)
{
switch (request)
{
}
}
-void BanCommand_kickban(float request, float argc, string command)
+void BanCommand_kickban(int request, int argc, string command)
{
switch (request)
{
}
}
-void BanCommand_mute(float request, float argc, string command) // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
+void BanCommand_mute(int request, int argc, string command) // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
{
switch (request)
{
}
}
-void BanCommand_unban(float request, float argc)
+void BanCommand_unban(int request, int argc)
{
switch (request)
{
}
}
-void BanCommand_unmute(float request, float argc)
+void BanCommand_unmute(int request, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void BanCommand_(float request)
+void BanCommand_(int request)
{
switch(request)
{
#undef BAN_COMMAND
}
-float BanCommand_macro_command(float argc, string command)
+float BanCommand_macro_command(int argc, string command)
{
#define BAN_COMMAND(name, function, description) \
{ if (name == strtolower(argv(0))) { function; return true; } }
return false;
}
-float BanCommand_macro_usage(float argc)
+float BanCommand_macro_usage(int argc)
{
#define BAN_COMMAND(name, function, description) \
{ if (name == strtolower(argv(1))) { function; return true; } }
float BanCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
void BanCommand_macro_write_aliases(float fh);
void BanCommand_macro_help();
-float BanCommand_macro_usage(float argc);
+float BanCommand_macro_usage(int argc);
// Command Sub-Functions
// =======================
-void ClientCommand_autoswitch(entity caller, float request, float argc)
+void ClientCommand_autoswitch(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_clientversion(entity caller, float request, float argc) // internal command, used only by code
+void ClientCommand_clientversion(entity caller, int request, int argc) // internal command, used only by code
{
switch (request)
{
}
}
-void ClientCommand_mv_getpicture(entity caller, float request, float argc) // internal command, used only by code
+void ClientCommand_mv_getpicture(entity caller, int request, int argc) // internal command, used only by code
{
switch (request)
{
}
}
-void ClientCommand_join(entity caller, float request)
+void ClientCommand_join(entity caller, int request)
{
switch (request)
{
}
}
-void ClientCommand_physics(entity caller, float request, float argc)
+void ClientCommand_physics(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_ready(entity caller, float request) // todo: anti-spam for toggling readyness
+void ClientCommand_ready(entity caller, int request) // todo: anti-spam for toggling readyness
{
switch (request)
{
}
}
-void ClientCommand_say(entity caller, float request, float argc, string command)
+void ClientCommand_say(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_say_team(entity caller, float request, float argc, string command)
+void ClientCommand_say_team(entity caller, int request, int argc, string command)
{
switch (request)
{
}
.bool team_selected;
-void ClientCommand_selectteam(entity caller, float request, float argc)
+void ClientCommand_selectteam(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_selfstuff(entity caller, float request, string command)
+void ClientCommand_selfstuff(entity caller, int request, string command)
{
switch (request)
{
}
}
-void ClientCommand_sentcvar(entity caller, float request, float argc, string command)
+void ClientCommand_sentcvar(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_spectate(entity caller, float request)
+void ClientCommand_spectate(entity caller, int request)
{
switch (request)
{
}
}
-void ClientCommand_suggestmap(entity caller, float request, float argc)
+void ClientCommand_suggestmap(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_tell(entity caller, float request, float argc, string command)
+void ClientCommand_tell(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_voice(entity caller, float request, float argc, string command)
+void ClientCommand_voice(entity caller, int request, int argc, string command)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void ClientCommand_(entity caller, float request)
+void ClientCommand_(entity caller, int request)
{
switch(request)
{
#define CLIENT_COMMANDS(ent, request, arguments, command) \
CLIENT_COMMAND("autoswitch", ClientCommand_autoswitch(ent, request, arguments), "Whether or not to switch automatically when getting a better weapon") \
CLIENT_COMMAND("clientversion", ClientCommand_clientversion(ent, request, arguments), "Release version of the game") \
- CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") \
CLIENT_COMMAND("join", ClientCommand_join(ent, request), "Become a player in the game") \
+ CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") \
+ CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") \
CLIENT_COMMAND("physics", ClientCommand_physics(ent, request, arguments), "Change physics set") \
CLIENT_COMMAND("ready", ClientCommand_ready(ent, request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
CLIENT_COMMAND("say", ClientCommand_say(ent, request, arguments, command), "Print a message to chat to all players") \
CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \
CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \
CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \
- CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") \
/* nothing */
void ClientCommand_macro_help(entity caller)
#undef CLIENT_COMMAND
}
-float ClientCommand_macro_command(float argc, entity caller, string command)
+float ClientCommand_macro_command(int argc, entity caller, string command)
{
#define CLIENT_COMMAND(name, function, description) \
{ if (name == strtolower(argv(0))) { function; return true; } }
return false;
}
-float ClientCommand_macro_usage(float argc, entity caller)
+float ClientCommand_macro_usage(int argc, entity caller)
{
#define CLIENT_COMMAND(name, function, description) \
{ if (name == strtolower(argv(1))) { function; return true; } }
// if we're banned, don't even parse the command
if (Ban_MaybeEnforceBanOnce(this)) return;
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
else return true;
}
-entity GetIndexedEntity(float argc, float start_index)
+entity GetIndexedEntity(int argc, float start_index)
{
entity selection;
float tmp_number, index;
// Common commands used in both sv_cmd.qc and cmd.qc
// ===================================================
-void CommonCommand_cvar_changes(float request, entity caller)
+void CommonCommand_cvar_changes(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_cvar_purechanges(float request, entity caller)
+void CommonCommand_cvar_purechanges(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_info(float request, entity caller, float argc)
+void CommonCommand_info(int request, entity caller, int argc)
{
switch (request)
{
}
}
-void CommonCommand_ladder(float request, entity caller)
+void CommonCommand_ladder(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_lsmaps(float request, entity caller)
+void CommonCommand_lsmaps(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_printmaplist(float request, entity caller)
+void CommonCommand_printmaplist(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_rankings(float request, entity caller)
+void CommonCommand_rankings(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_records(float request, entity caller)
+void CommonCommand_records(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_teamstatus(float request, entity caller)
+void CommonCommand_teamstatus(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_time(float request, entity caller)
+void CommonCommand_time(int request, entity caller)
{
switch (request)
{
print_to(caller, strcat("realtime = ", ftos(gettime(GETTIME_REALTIME))));
print_to(caller, strcat("hires = ", ftos(gettime(GETTIME_HIRES))));
print_to(caller, strcat("uptime = ", ftos(gettime(GETTIME_UPTIME))));
- print_to(caller, strcat("localtime = ", strftime(true, "%a %b %e %H:%M:%S %Z %Y")));
- print_to(caller, strcat("gmtime = ", strftime(false, "%a %b %e %H:%M:%S %Z %Y")));
+ print_to(caller, strcat("localtime = ", strftime(true, "%a %b %d %H:%M:%S %Z %Y")));
+ print_to(caller, strcat("gmtime = ", strftime(false, "%a %b %d %H:%M:%S %Z %Y")));
return;
}
}
}
-void CommonCommand_timein(float request, entity caller)
+void CommonCommand_timein(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAND IS TERRIBLE.
+void CommonCommand_timeout(int request, entity caller) // DEAR GOD THIS COMMAND IS TERRIBLE.
{
switch (request)
{
}
}
-void CommonCommand_who(float request, entity caller, float argc)
+void CommonCommand_who(int request, entity caller, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void CommonCommand_(float request, entity caller)
+void CommonCommand_(int request, entity caller)
{
switch(request)
{
// is this entity number even in the possible range of entities?
float VerifyClientNumber(float tmp_number);
-entity GetIndexedEntity(float argc, float start_index);
+entity GetIndexedEntity(int argc, float start_index);
// find a player which matches the input string, and return their entity
entity GetFilteredEntity(string input);
// Common commands used in both sv_cmd.qc and cmd.qc
// ===================================================
-void CommonCommand_cvar_changes(float request, entity caller);
+void CommonCommand_cvar_changes(int request, entity caller);
-void CommonCommand_cvar_purechanges(float request, entity caller);
+void CommonCommand_cvar_purechanges(int request, entity caller);
-void CommonCommand_editmob(float request, entity caller, float argc);
+void CommonCommand_editmob(int request, entity caller, int argc);
-void CommonCommand_info(float request, entity caller, float argc);
+void CommonCommand_info(int request, entity caller, int argc);
-void CommonCommand_ladder(float request, entity caller);
+void CommonCommand_ladder(int request, entity caller);
-void CommonCommand_lsmaps(float request, entity caller);
+void CommonCommand_lsmaps(int request, entity caller);
-void CommonCommand_printmaplist(float request, entity caller);
+void CommonCommand_printmaplist(int request, entity caller);
-void CommonCommand_rankings(float request, entity caller);
+void CommonCommand_rankings(int request, entity caller);
-void CommonCommand_records(float request, entity caller);
+void CommonCommand_records(int request, entity caller);
-void CommonCommand_teamstatus(float request, entity caller);
+void CommonCommand_teamstatus(int request, entity caller);
-void CommonCommand_time(float request, entity caller);
+void CommonCommand_time(int request, entity caller);
-void CommonCommand_timein(float request, entity caller);
+void CommonCommand_timein(int request, entity caller);
-void CommonCommand_timeout(float request, entity caller);
+void CommonCommand_timeout(int request, entity caller);
-void CommonCommand_who(float request, entity caller, float argc);
+void CommonCommand_who(int request, entity caller, int argc);
// ==================================
FOREACH(COMMON_COMMANDS, true, { print_to(caller, sprintf(" ^2%s^7: %s", it.m_name, it.m_description)); });
}
-float CommonCommand_macro_command(float argc, entity caller, string command)
+float CommonCommand_macro_command(int argc, entity caller, string command)
{
string c = strtolower(argv(0));
FOREACH(COMMON_COMMANDS, it.m_name == c, {
return false;
}
-float CommonCommand_macro_usage(float argc, entity caller)
+float CommonCommand_macro_usage(int argc, entity caller)
{
string c = strtolower(argv(1));
FOREACH(COMMON_COMMANDS, it.m_name == c, {
}
}
-bool RadarMap_Make(float argc)
+bool RadarMap_Make(int argc)
{
float i;
#pragma once
#ifndef RADARMAP
-bool RadarMap_Make(float argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
+bool RadarMap_Make(int argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
#else
// ===========================================
// FF is contained twice, to map 256 to FF too
// removes the need to bound()
-bool RadarMap_Make(float argc);
+bool RadarMap_Make(int argc);
#endif
// Command Sub-Functions
// =======================
-void GameCommand_adminmsg(float request, float argc)
+void GameCommand_adminmsg(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_allready(float request)
+void GameCommand_allready(int request)
{
switch (request)
{
}
}
-void GameCommand_allspec(float request, float argc)
+void GameCommand_allspec(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_anticheat(float request, float argc)
+void GameCommand_anticheat(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_bbox(float request)
+void GameCommand_bbox(int request)
{
switch (request)
{
}
}
-void GameCommand_bot_cmd(float request, float argc, string command)
+void GameCommand_bot_cmd(int request, int argc, string command)
{
switch (request)
{
}
}
-void GameCommand_cointoss(float request, float argc)
+void GameCommand_cointoss(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_database(float request, float argc)
+void GameCommand_database(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_defer_clear(float request, float argc)
+void GameCommand_defer_clear(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_defer_clear_all(float request)
+void GameCommand_defer_clear_all(int request)
{
switch (request)
{
case CMD_REQUEST_COMMAND:
{
int n = 0;
- float argc;
+ int argc;
FOREACH_CLIENT(true, {
argc = tokenize_console(strcat("defer_clear ", ftos(etof(it))));
}
}
-void GameCommand_delrec(float request, float argc) // perhaps merge later with records and printstats and such?
+void GameCommand_delrec(int request, int argc) // perhaps merge later with records and printstats and such?
{
switch (request)
{
}
}
-void GameCommand_effectindexdump(float request)
+void GameCommand_effectindexdump(int request)
{
switch (request)
{
}
}
-void GameCommand_extendmatchtime(float request)
+void GameCommand_extendmatchtime(int request)
{
switch (request)
{
}
}
-void GameCommand_gametype(float request, float argc)
+void GameCommand_gametype(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_gettaginfo(float request, float argc)
+void GameCommand_gettaginfo(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_animbench(float request, float argc)
+void GameCommand_animbench(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_gotomap(float request, float argc)
+void GameCommand_gotomap(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_lockteams(float request)
+void GameCommand_lockteams(int request)
{
switch (request)
{
}
}
-void GameCommand_make_mapinfo(float request)
+void GameCommand_make_mapinfo(int request)
{
switch (request)
{
}
}
-void GameCommand_moveplayer(float request, float argc)
+void GameCommand_moveplayer(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_nospectators(float request)
+void GameCommand_nospectators(int request)
{
switch (request)
{
}
}
-void GameCommand_printstats(float request)
+void GameCommand_printstats(int request)
{
switch (request)
{
}
}
-void GameCommand_radarmap(float request, float argc)
+void GameCommand_radarmap(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_reducematchtime(float request)
+void GameCommand_reducematchtime(int request)
{
switch (request)
{
}
}
-void GameCommand_setbots(float request, float argc)
+void GameCommand_setbots(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_shuffleteams(float request)
+void GameCommand_shuffleteams(int request)
{
switch (request)
{
}
}
-void GameCommand_stuffto(float request, float argc)
+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.
// Because of this, it is disabled by default and must be enabled by the server owner when doing compilation. That way,
#endif
}
-void GameCommand_trace(float request, float argc)
+void GameCommand_trace(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_unlockteams(float request)
+void GameCommand_unlockteams(int request)
{
switch (request)
{
}
}
-void GameCommand_warp(float request, float argc)
+void GameCommand_warp(int request, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GameCommand_(float request)
+void GameCommand_(int request)
{
switch(request)
{
FOREACH(SERVER_COMMANDS, true, { LOG_INFOF(" ^2%s^7: %s", it.m_name, it.m_description); });
}
-float GameCommand_macro_command(float argc, string command)
+float GameCommand_macro_command(int argc, string command)
{
string c = strtolower(argv(0));
FOREACH(SERVER_COMMANDS, it.m_name == c, {
return false;
}
-float GameCommand_macro_usage(float argc)
+float GameCommand_macro_usage(int argc)
{
string c = strtolower(argv(1));
FOREACH(SERVER_COMMANDS, it.m_name == c, {
void GameCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
return false;
}
-string VoteCommand_extractcommand(string input, float startpos, float argc)
+string VoteCommand_extractcommand(string input, float startpos, int argc)
{
string output;
return validated_map;
}
-float VoteCommand_checkargs(float startpos, float argc)
+float VoteCommand_checkargs(float startpos, int argc)
{
float p, q, check, minargs;
string cvarname = strcat("sv_vote_command_restriction_", argv(startpos));
return true;
}
-int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
+int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, int argc)
{
string first_command = argv(startpos);
int missing_chars = argv_start_index(startpos);
// Command Sub-Functions
// =======================
-void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
+void VoteCommand_abstain(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_call(float request, entity caller, float argc, string vote_command) // BOTH
+void VoteCommand_call(int request, entity caller, int argc, string vote_command) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_master(float request, entity caller, float argc, string vote_command) // CLIENT ONLY
+void VoteCommand_master(int request, entity caller, int argc, string vote_command) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_no(float request, entity caller) // CLIENT ONLY
+void VoteCommand_no(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_status(float request, entity caller) // BOTH
+void VoteCommand_status(int request, entity caller) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_stop(float request, entity caller) // BOTH
+void VoteCommand_stop(int request, entity caller) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
+void VoteCommand_yes(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void VoteCommand_(float request)
+void VoteCommand_(int request)
{
switch(request)
{
VOTE_COMMAND("yes", VoteCommand_yes(request, caller), "Select yes in current vote", VC_ASGNMNT_CLIENTONLY) \
/* nothing */
-void VoteCommand_macro_help(entity caller, float argc)
+void VoteCommand_macro_help(entity caller, int argc)
{
string command_origin = GetCommandPrefix(caller);
}
}
-float VoteCommand_macro_command(entity caller, float argc, string vote_command)
+float VoteCommand_macro_command(entity caller, int argc, string vote_command)
{
#define VOTE_COMMAND(name, function, description, assignment) \
{ if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } }
// Main function handling vote commands
// ======================================
-void VoteCommand(float request, entity caller, float argc, string vote_command)
+void VoteCommand(int request, entity caller, int argc, string vote_command)
{
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
// allow functions to be used in other code like g_world.qc and teamplay.qc
void VoteThink();
void VoteReset();
-void VoteCommand(float request, entity caller, float argc, string vote_command);
+void VoteCommand(int request, entity caller, int argc, string vote_command);
// warmup and nagger stuff
const float RESTART_COUNTDOWN = 10;
//spawnfunc(item_armor1) {spawnfunc_item_armor_medium(this);} // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
SPAWNFUNC_ITEM(item_armor2, ITEM_ArmorMega)
SPAWNFUNC_ITEM(item_armorInv, ITEM_ArmorMega) // TODO: make sure we actually want this
-spawnfunc(item_health) {if (this.spawnflags & 2) StartItem(this, ITEM_HealthMega);else StartItem(this, ITEM_HealthMedium);}
+SPAWNFUNC_ITEM_COND(item_health, (this.spawnflags & 2), ITEM_HealthMega, ITEM_HealthMedium)
float bots_would_leave;
void UpdateFrags(entity player, int f);
-.float totalfrags;
+.int totalfrags;
// flag set on worldspawn so that the code knows if it is dedicated or not
float server_is_dedicated;
//.float worldtype;
// Needed for dynamic clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
.float alpha_max, alpha_min;
.float fade_start, fade_end, fade_vertical_offset;
.float default_solid; // Variable to store default .solid for clientwalls
float ServerProgsDB;
float TemporaryDB;
-.float team_saved;
+.int team_saved;
bool some_spawn_has_been_used;
int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found
.float weapon_load[Weapons_MAX];
.int ammo_none; // used by the reloading system, must always be 0
-.float clip_load;
-.float old_clip_load;
-.float clip_size;
+.int clip_load;
+.int old_clip_load;
+.int clip_size;
.int minelayer_mines;
.float vortex_charge;
// when doing this, hagar can go through clones
// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
-.float spectatee_status;
-.float zoomstate;
-.float restriction;
+.int spectatee_status;
+.bool zoomstate;
+.int restriction;
.entity clientdata;
.entity personal;
.bool just_joined;
.float cvar_cl_weaponimpulsemode;
-.float selectweapon; // last selected weapon of the player
+.int selectweapon; // last selected weapon of the player
.float ballistics_density; // wall piercing factor, larger = bullet can pass through more
-const float ACTIVE_NOT = 0;
-const float ACTIVE_ACTIVE = 1;
-const float ACTIVE_IDLE = 2;
-const float ACTIVE_BUSY = 2;
-const float ACTIVE_TOGGLE = 3;
-.float active;
+const int ACTIVE_NOT = 0;
+const int ACTIVE_ACTIVE = 1;
+const int ACTIVE_IDLE = 2;
+const int ACTIVE_BUSY = 2;
+const int ACTIVE_TOGGLE = 3;
+.int active;
.void (entity this, int act_state) setactive;
.entity realowner;
//float serverflags;
-.float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
+.int team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
-.float player_blocked;
+.bool player_blocked;
.float revival_time; // time at which player was last revived
.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
string modname;
-.float missile_flags;
+.int missile_flags;
const int MIF_SPLASH = BIT(1);
const int MIF_ARC = BIT(2);
const int MIF_PROXY = BIT(3);
.float teamkill_soundtime;
.entity teamkill_soundsource;
.entity pusher;
-.float istypefrag;
+.bool istypefrag;
.float taunt_soundtime;
float IsFlying(entity a);
void OnlineBanList_Think(entity this)
{
- float argc;
+ int argc;
string uri;
float i, n;
{
traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
}
-.bool ctrace_solidchanged;
+
void crosshair_trace_plusvisibletriggers(entity pl)
+{
+ crosshair_trace_plusvisibletriggers__is_wz(pl, false);
+}
+
+void WarpZone_crosshair_trace_plusvisibletriggers(entity pl)
+{
+ crosshair_trace_plusvisibletriggers__is_wz(pl, true);
+}
+
+void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz)
{
FOREACH_ENTITY_FLOAT(solid, SOLID_TRIGGER,
{
if(it.model != "")
{
it.solid = SOLID_BSP;
- it.ctrace_solidchanged = true;
IL_PUSH(g_ctrace_changed, it);
}
});
- crosshair_trace(pl);
+ if (is_wz)
+ WarpZone_crosshair_trace(pl);
+ else
+ crosshair_trace(pl);
- IL_EACH(g_ctrace_changed, it.ctrace_solidchanged,
- {
- it.solid = SOLID_TRIGGER;
- it.ctrace_solidchanged = false;
- });
+ IL_EACH(g_ctrace_changed, true, { it.solid = SOLID_TRIGGER; });
IL_CLEAR(g_ctrace_changed);
}
+
void WarpZone_crosshair_trace(entity pl)
{
WarpZone_traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
{
float p, p1, p2;
float n;
- vector cursor;
- entity cursor_ent;
+ vector cursor = '0 0 0';
+ entity cursor_ent = NULL;
string escape;
string replacement;
p = 0;
n = 7;
-
- WarpZone_crosshair_trace(this);
- cursor = trace_endpos;
- cursor_ent = trace_ent;
+ bool traced = false;
MUTATOR_CALLHOOK(PreFormatMessage, this, msg);
msg = M_ARGV(1, string);
if (p < 0)
break;
+ if(!traced)
+ {
+ WarpZone_crosshair_trace_plusvisibletriggers(this);
+ cursor = trace_endpos;
+ cursor_ent = trace_ent;
+ traced = true;
+ }
+
replacement = substring(msg, p, 2);
escape = substring(msg, p + 1, 1);
builtin_remove(e);
}
-void InitializeEntity(entity e, void(entity this) func, float order)
+void InitializeEntity(entity e, void(entity this) func, int order)
{
entity prev, cur;
void crosshair_trace(entity pl);
void crosshair_trace_plusvisibletriggers(entity pl);
+void WarpZone_crosshair_trace_plusvisibletriggers(entity pl);
+void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz);
void detach_sameorigin(entity e);
//#NO AUTOCVARS END
-const float INITPRIO_FIRST = 0;
-const float INITPRIO_GAMETYPE = 0;
-const float INITPRIO_GAMETYPE_FALLBACK = 1;
-const float INITPRIO_FINDTARGET = 10;
-const float INITPRIO_DROPTOFLOOR = 20;
-const float INITPRIO_SETLOCATION = 90;
-const float INITPRIO_LINKDOORS = 91;
-const float INITPRIO_LAST = 99;
+const int INITPRIO_FIRST = 0;
+const int INITPRIO_GAMETYPE = 0;
+const int INITPRIO_GAMETYPE_FALLBACK = 1;
+const int INITPRIO_FINDTARGET = 10;
+const int INITPRIO_DROPTOFLOOR = 20;
+const int INITPRIO_SETLOCATION = 90;
+const int INITPRIO_LINKDOORS = 91;
+const int INITPRIO_LAST = 99;
.void(entity this) initialize_entity;
-.float initialize_entity_order;
+.int initialize_entity_order;
.entity initialize_entity_next;
entity initialize_entity_first;
-float sound_allowed(float dest, entity e);
-void InitializeEntity(entity e, void(entity this) func, float order);
+bool sound_allowed(int dest, entity e);
+void InitializeEntity(entity e, void(entity this) func, int order);
IntrusiveList g_ctrace_changed;
STATIC_INIT(g_ctrace_changed) { g_ctrace_changed = IL_NEW(); }
.entity pusher;
.float pushltime;
-.float istypefrag;
+.bool istypefrag;
.float CopyBody_nextthink;
.void(entity this) CopyBody_think;
this.nextthink = max(time, game_starttime);
}
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func)
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
{
if (round_handler)
{
entity round_handler;
.float delay; // stores delay from round end to countdown start
.float count; // stores initial number of the countdown
-.float wait; // it's set to true when round ends, to false when countdown starts
+.bool wait; // it's set to true when round ends, to false when countdown starts
.float cnt; // its initial value is .count + 1, then decreased while counting down
// reaches 0 when the round starts
.float round_timelimit;
.float round_endtime;
-.float() canRoundStart;
-.float() canRoundEnd;
+.bool() canRoundStart;
+.bool() canRoundEnd;
.void() roundStart;
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func);
void round_handler_Reset(float next_think);
void round_handler_Remove();
return team_bits;
}
-void TeamBalance_JoinBestTeam(entity this, bool force_best_team)
+void TeamBalance_JoinBestTeam(entity this)
{
- //PrintToChatAll(sprintf("JoinBestTeam: %s, %f", this.netname, force_best_team));
- // don't join a team if we're not playing a team game
+ //PrintToChatAll(sprintf("JoinBestTeam: %s", this.netname));
if (!teamplay)
{
return;
}
-
- // find out what teams are available
+ if (this.bot_forced_team)
+ {
+ return;
+ }
+ int old_team_index = Team_TeamToIndex(this.team);
entity balance = TeamBalance_CheckAllowedTeams(this);
-
- // if we don't care what team they end up on, put them on whatever team they entered as.
- // if they're not on a valid team, then let other code put them on the smallest team
- if (!force_best_team)
+ if (this.team_forced > 0)
{
- int selected_team_index = -1;
- for (int i = 1; i <= NUM_TEAMS; ++i)
+ int forced_team_index = Team_TeamToIndex(this.team_forced);
+ bool is_team_allowed = TeamBalance_IsTeamAllowedInternal(balance,
+ forced_team_index);
+ TeamBalance_Destroy(balance);
+ if (!is_team_allowed)
{
- if (TeamBalance_IsTeamAllowedInternal(balance, i) &&
- (Team_TeamToIndex(this.team) == i))
- {
- selected_team_index = i;
- break;
- }
+ return;
}
-
- if (Team_IsValidIndex(selected_team_index))
+ if (!SetPlayerTeam(this, forced_team_index, TEAM_CHANGE_AUTO))
{
- SetPlayerTeam(this, selected_team_index, TEAM_CHANGE_AUTO_RELAXED);
- TeamBalance_Destroy(balance);
return;
}
- }
- // otherwise end up on the smallest team (handled below)
- if (this.bot_forced_team)
- {
- TeamBalance_Destroy(balance);
+ if ((old_team_index != -1) && !IS_BOT_CLIENT(this))
+ {
+ TeamBalance_AutoBalanceBots(forced_team_index, old_team_index);
+ }
return;
}
int best_team_index = TeamBalance_FindBestTeam(balance, this, true);
- int old_team_index = Team_TeamToIndex(this.team);
TeamBalance_Destroy(balance);
PlayerScore_Clear(this);
if (!SetPlayerTeam(this, best_team_index, TEAM_CHANGE_AUTO))
{
return;
}
+ if (source_team_index == -1)
+ {
+ return;
+ }
TeamBalance_AutoBalanceBots(destination_team_index, source_team_index);
}
enum
{
- TEAM_CHANGE_CONNECT = 1,
TEAM_CHANGE_AUTO = 2,
TEAM_CHANGE_MANUAL = 3,
- TEAM_CHANGE_SPECTATOR = 4,
- TEAM_CHANGE_AUTO_RELAXED = 99
+ TEAM_CHANGE_SPECTATOR = 4
};
void LogTeamchange(float player_id, float team_number, int type);
/// function.
int TeamBalance_FindBestTeams(entity balance, entity player, bool use_score);
-void TeamBalance_JoinBestTeam(entity this, bool force_best_team);
+void TeamBalance_JoinBestTeam(entity this);
/// \brief Describes the result of comparing teams.
enum
r_shadow_glossexact 1
r_shadow_glossintensity 1
-// use fake light if map has no lightmaps
-r_fakelight 1
+// use slightly better lighting than r_fullbright if map has no lightmaps, and for fullbrightplayers
+r_fullbright_directed 1
r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
r_water_refractdistort 0.019
set cl_rainsnow_maxdrawdist 2048
-// equalize looks better than fullbright
-r_equalize_entities_fullbright 1
-
// safe font defaults
r_font_hinting 1
r_font_disable_freetype 0