]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
authorSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 18:44:42 +0000 (13:44 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 18:44:42 +0000 (13:44 -0500)
87 files changed:
_hud_common.cfg
commands.cfg
defaultXonotic.cfg
gamemodes.cfg
notifications.cfg [new file with mode: 0644]
qcsrc/Makefile
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/damage.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/main.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/progs.src
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/teamplay.qc [deleted file]
qcsrc/client/teamplay.qh [deleted file]
qcsrc/client/tturrets.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/command/generic.qc
qcsrc/common/constants.qh
qcsrc/common/deathtypes.qh [new file with mode: 0644]
qcsrc/common/notifications.qc [new file with mode: 0644]
qcsrc/common/notifications.qh [new file with mode: 0644]
qcsrc/common/teams.qh [new file with mode: 0644]
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/progs.src
qcsrc/server/arena.qc
qcsrc/server/assault.qc
qcsrc/server/attic/ctf.qc
qcsrc/server/attic/domination.qc
qcsrc/server/attic/nexball.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/constants.qh
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/progs.src
qcsrc/server/race.qc
qcsrc/server/scores.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index f4fa1c9427e3f2cc38e1a08970b42d0d0d6029ab..ca90bc9da204f14dc8af7cf536336699cb230363 100644 (file)
@@ -10,6 +10,15 @@ seta hud_cursormode 1 "handle mouse input in cursor mode when CSQC displays a cu
 seta hud_fontsize 11 "text fontsize for the hud"
 seta hud_width 560 "2D virtual width for the hud"
 
+seta hud_colorset_foreground_1 "2" "primary priority (important names, etc)"
+seta hud_colorset_foreground_2 "3" "secondary priority (items, locations, numbers, etc)"
+seta hud_colorset_foreground_3 "4" "tertiary priority or relatively inconsequential text"
+seta hud_colorset_foreground_4 "1" "notice/attention grabbing texting"
+seta hud_colorset_kill_1 "1" "'bad' or 'dangerous' text (death messages against you, kill notifications, etc)"
+seta hud_colorset_kill_2 "3" "similar to above, but less important... OR, a highlight out of above message type"
+seta hud_colorset_kill_3 "4" "'good' or 'beneficial' text (you fragging someone, etc)"
+seta hud_colorset_background "7" "neutral/unimportant text"
+
 // general hud panel cvars (i.e. shouldn't be adjusted by a skin config)
 seta hud_panel_weapons_ammo_full_shells 60 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_nails 320 "show 100% of the status bar at this ammo count"
@@ -92,4 +101,4 @@ seta hud_shownames_mindistance 1000 "start fading alpha/size at this distance"
 seta hud_shownames_maxdistance 5000 "alpha/size is 0 at this distance"
 seta hud_shownames_antioverlap 1 "if two tags get too close to each other, fade out the one further away from you"
 seta hud_shownames_antioverlap_distance 50 "2d distance to other tag after which to fade out"
-seta hud_shownames_offset 52 "offset (along z-axis) tag from player origin by this many units"
\ No newline at end of file
+seta hud_shownames_offset 52 "offset (along z-axis) tag from player origin by this many units"
index 44fa671bd7f88e4ace9f1c4be2cf0e3929ad1542..0aece8a628129a88a898cef037fc4c75034f6224 100644 (file)
@@ -52,10 +52,11 @@ alias who                  "qc_cmd_svcmd  who                  ${* ?}" // Displa
 
 // generic commands (across all programs)
 alias addtolist            "qc_cmd_svmenu addtolist            ${* ?}" // Add a string to a cvar
-alias qc_curl              "qc_cmd_svmenu curl                 ${* ?}" // curl requests
 alias dumpcommands         "qc_cmd_svmenu dumpcommands         ${* ?}" // Dump all commands on the program to *_cmd_dump.txt
+alias dumpnotifs           "qc_cmd_svmenu dumpnotifs           ${* ?}" // Dump all notifications into notifications_dump.txt
 alias maplist              "qc_cmd_svmenu maplist              ${* ?}" // Automatic control of maplist
-alias nextframe            "qc_cmd_svmenu nextframe            ${* ?}" // do something next frame
+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 rpn                  "qc_cmd_svmenu rpn                  ${* ?}" // RPN calculator
 //alias settemp            "qc_cmd_svmenu settemp              ${* ?}" // Temporarily set a value to a cvar which is restored later
index 8e9798c8983925ec78ada995c940dcfe18b27590..c2697006a58e3a3996268b2d48f0be04c4361cb2 100644 (file)
@@ -818,6 +818,7 @@ set g_chat_flood_lmax_tell 2        "private chat: maximum number of lines per chat mes
 set g_chat_flood_burst_tell 2  "private chat: allow bursts of so many chat lines"
 set g_chat_flood_notify_flooder 1      "when 0, the flooder still can see his own message"
 set g_chat_teamcolors 0        "colorize nicknames in team color for chat"
+set g_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
 set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
 set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
 set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
@@ -1550,6 +1551,7 @@ exec turrets.cfg
 exec vehicles.cfg
 exec crosshairs.cfg
 exec gamemodes.cfg
+exec notifications.cfg
 
 // load console command aliases and settings
 exec commands.cfg
index 6cff7e5a42666ab32954c8ec8d5abb757b1a09f6..c1e3f43e3fd197ca884d530363ea55a367432dbc 100644 (file)
@@ -197,7 +197,6 @@ set g_ctf_flag_collect_delay 1
 set g_ctf_flag_health 0
 set g_ctf_flag_dropped_waypoint 2 "show dropped flag waypointsprite when a flag is lost. 1 = team only, 2 = for all players"
 set g_ctf_flag_dropped_floatinwater 200 "move upwards while in water at this velocity"
-set g_ctf_flag_pickup_verbosename 0 "show the name of the person who picked up the flag too"
 set g_ctf_throw 1 "throwing allows circumventing carrierkill score, so enable this with care!"
 set g_ctf_throw_angle_max 90 "maximum upwards angle you can throw the flag"
 set g_ctf_throw_angle_min -90 "minimum downwards angle you can throw the flag"
@@ -343,7 +342,6 @@ set g_lms 0 "Last Man Standing: everyone starts with a certain amount of lives,
 set g_lms_lives_override -1
 set g_lms_regenerate 0
 set g_lms_campcheck_interval 10
-set g_lms_campcheck_message "^1Don't camp!"
 set g_lms_campcheck_damage 100
 set g_lms_campcheck_distance 1800
 set g_lms_last_join 3  "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives"
diff --git a/notifications.cfg b/notifications.cfg
new file mode 100644 (file)
index 0000000..0cf9bcc
--- /dev/null
@@ -0,0 +1,436 @@
+// ********************************************** //
+// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //
+// **                                          ** //
+// **  This file is automatically generated    ** //
+// **  by code with the command 'dumpnotifs'.  ** //
+// **                                          ** //
+// **  If you add a new notification, please   ** //
+// **  regenerate this file with that command  ** //
+// **  making sure that the output matches     ** //
+// **  with the lists and defaults in code.    ** //
+// **                                          ** //
+// ********************************************** //
+
+// MSG_INFO notifications (count = 183):
+seta notification_INFO_CTF_FLAGRETURN_DROPPED_RED 1 "notif string: ^7The ^1RED^7 flag was dropped in the base and returned itself\n^7"
+seta notification_INFO_CTF_FLAGRETURN_DROPPED_BLUE 1 "notif string: ^7The ^4BLUE^7 flag was dropped in the base and returned itself\n^7"
+seta notification_INFO_CTF_FLAGRETURN_DAMAGED_RED 1 "notif string: ^7The ^1RED^7 flag was destroyed and returned to base\n^7"
+seta notification_INFO_CTF_FLAGRETURN_DAMAGED_BLUE 1 "notif string: ^7The ^4BLUE^7 flag was destroyed and returned to base\n^7"
+seta notification_INFO_CTF_FLAGRETURN_SPEEDRUN_RED 1 "notif string: ^7The ^1RED^7 flag became impatient after ^2%.2f^7 seconds and returned itself\n^7"
+seta notification_INFO_CTF_FLAGRETURN_SPEEDRUN_BLUE 1 "notif string: ^7The ^4BLUE^7 flag became impatient after ^2%.2f^7 seconds and returned itself\n^7"
+seta notification_INFO_CTF_FLAGRETURN_NEEDKILL_RED 1 "notif string: ^7The ^1RED^7 flag fell somewhere it couldn't be reached and returned to base\n^7"
+seta notification_INFO_CTF_FLAGRETURN_NEEDKILL_BLUE 1 "notif string: ^7The ^4BLUE^7 flag fell somewhere it couldn't be reached and returned to base\n^7"
+seta notification_INFO_CTF_FLAGRETURN_ABORTRUN_RED 1 "notif string: ^7The ^1RED^7 flag was returned to base by its owner\n^7"
+seta notification_INFO_CTF_FLAGRETURN_ABORTRUN_BLUE 1 "notif string: ^7The ^4BLUE^7 flag was returned to base by its owner\n^7"
+seta notification_INFO_CTF_FLAGRETURN_TIMEOUT_RED 1 "notif string: ^7The ^1RED^7 flag has returned to the base\n^7"
+seta notification_INFO_CTF_FLAGRETURN_TIMEOUT_BLUE 1 "notif string: ^7The ^4BLUE^7 flag has returned to the base\n^7"
+seta notification_INFO_CTF_PICKUP_RED 1 "notif string: ^7%s^7 got the ^1RED^7 flag\n^7"
+seta notification_INFO_CTF_PICKUP_BLUE 1 "notif string: ^7%s^7 got the ^4BLUE^7 flag\n^7"
+seta notification_INFO_CTF_RETURN_RED 1 "notif string: ^7%s^7 returned the ^1RED^7 flag\n^7"
+seta notification_INFO_CTF_RETURN_BLUE 1 "notif string: ^7%s^7 returned the ^4BLUE^7 flag\n^7"
+seta notification_INFO_CTF_LOST_RED 1 "notif string: ^7%s^7 lost the ^1RED^7 flag\n^7"
+seta notification_INFO_CTF_LOST_BLUE 1 "notif string: ^7%s^7 lost the ^4BLUE^7 flag\n^7"
+seta notification_INFO_CTF_CAPTURE_RED 1 "notif string: ^7%s^7 captured the ^1RED^7 flag\n^7"
+seta notification_INFO_CTF_CAPTURE_BLUE 1 "notif string: ^7%s^7 captured the ^4BLUE^7 flag\n^7"
+seta notification_INFO_CTF_CAPTURE_TIME_RED 1 "notif string: ^7%s^7 captured the ^1RED^7 flag in ^2%s^7 seconds\n^7"
+seta notification_INFO_CTF_CAPTURE_TIME_BLUE 1 "notif string: ^7%s^7 captured the ^4BLUE^7 flag in ^2%s^7 seconds\n^7"
+seta notification_INFO_CTF_CAPTURE_BROKEN_RED 1 "notif string: ^7%s^7 captured the ^1RED^7 flag in ^2%s^7 seconds, breaking ^7%s^7's previous record of ^3%s^7 seconds\n^7"
+seta notification_INFO_CTF_CAPTURE_BROKEN_BLUE 1 "notif string: ^7%s^7 captured the ^4BLUE^7 flag in ^2%s^7 seconds, breaking ^7%s^7's previous record of ^3%s^7 seconds\n^7"
+seta notification_INFO_CTF_CAPTURE_UNBROKEN_RED 1 "notif string: ^7%s^7 captured the ^1RED^7 flag in ^3%s^7 seconds, failing to break ^7%s^7's previous record of ^2%s^7 seconds\n^7"
+seta notification_INFO_CTF_CAPTURE_UNBROKEN_BLUE 1 "notif string: ^7%s^7 captured the ^4BLUE^7 flag in ^3%s^7 seconds, failing to break ^7%s^7's previous record of ^2%s^7 seconds\n^7"
+seta notification_INFO_DEATH_TEAMKILL_RED 1 "notif string: ^7%s^1 was betrayed by ^7%s^1%s\n^7"
+seta notification_INFO_DEATH_TEAMKILL_BLUE 1 "notif string: ^7%s^1 was betrayed by ^7%s^1%s\n^7"
+seta notification_INFO_DEATH_TEAMKILL_YELLOW 1 "notif string: ^7%s^1 was betrayed by ^7%s^1%s\n^7"
+seta notification_INFO_DEATH_TEAMKILL_PINK 1 "notif string: ^7%s^1 was betrayed by ^7%s^1%s\n^7"
+seta notification_INFO_DEATH_SELF_CUSTOM 1 "notif string: ^7%s^1 %s^1%s%s\n^7"
+seta notification_INFO_DEATH_SELF_GENERIC 1 "notif string: ^7%s^1 died%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VOID 1 "notif string: ^7%s^1 was in the wrong place%s%s\n^7"
+seta notification_INFO_DEATH_SELF_SUICIDE 1 "notif string: ^7%s^1 couldn't take it anymore%s%s\n^7"
+seta notification_INFO_DEATH_SELF_NOAMMO 1 "notif string: ^7%s^1 died%s%s. What's the point of living without ammo?\n^7"
+seta notification_INFO_DEATH_SELF_ROT 1 "notif string: ^7%s^1 rotted away%s%s\n^7"
+seta notification_INFO_DEATH_SELF_CAMP 1 "notif string: ^7%s^1 thought they found a nice camping ground%s%s\n^7"
+seta notification_INFO_DEATH_SELF_BETRAYAL 1 "notif string: ^7%s^1 became enemies with the Lord of Teamplay%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TEAMCHANGE 1 "notif string: ^7%s^1 switched to the %s%s\n^7"
+seta notification_INFO_DEATH_SELF_AUTOTEAMCHANGE 1 "notif string: ^7%s^1 was moved into the %s%s\n^7"
+seta notification_INFO_DEATH_SELF_FALL 1 "notif string: ^7%s^1 hit the ground with a crunch%s%s\n^7"
+seta notification_INFO_DEATH_SELF_DROWN 1 "notif string: ^7%s^1 couldn't catch their breath%s%s\n^7"
+seta notification_INFO_DEATH_SELF_FIRE 1 "notif string: ^7%s^1 became a bit too crispy%s%s\n^7"
+seta notification_INFO_DEATH_SELF_LAVA 1 "notif string: ^7%s^1 turned into hot slag%s%s\n^7"
+seta notification_INFO_DEATH_SELF_SLIME 1 "notif string: ^7%s^1 was slimed%s%s\n^7"
+seta notification_INFO_DEATH_SELF_SHOOTING_STAR 1 "notif string: ^7%s^1 became a shooting star%s%s\n^7"
+seta notification_INFO_DEATH_SELF_SWAMP 1 "notif string: ^7%s^1 is now preserved for centuries to come%s%s\n^7"
+seta notification_INFO_DEATH_SELF_CHEAT 1 "notif string: ^7%s^1 unfairly eliminated themself%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TOUCHEXPLODE 1 "notif string: ^7%s^1 died in an accident%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET 1 "notif string: ^7%s^1 ran into a turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_EWHEEL 1 "notif string: ^7%s^1 was blasted away by an eWheel turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_FLAC 1 "notif string: ^7%s^1 got caught up in the FLAC turret fire%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_MACHINEGUN 1 "notif string: ^7%s^1 was riddled full of holes by a Machinegun turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_WALK_GUN 1 "notif string: ^7%s^1 got served a lead enrichment by a Walker turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_WALK_MEELE 1 "notif string: ^7%s^1 was impaled by a Walker turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_WALK_ROCKET 1 "notif string: ^7%s^1 was blasted away by a Walker turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_HELLION 1 "notif string: ^7%s^1 was blasted away by a Hellion turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_HK 1 "notif string: ^7%s^1 could not hide from the Hunter turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_MLRS 1 "notif string: ^7%s^1 got turned into smoldering gibs by an MLRS turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_PLASMA 1 "notif string: ^7%s^1 got served some superheated plasma from a turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_PHASER 1 "notif string: ^7%s^1 was phased out by a turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_TURRET_TESLA 1 "notif string: ^7%s^1 was electrocuted by a Tesla turret%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_CRUSH 1 "notif string: ^7%s^1 was crushed by a vehicle%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_SPID_ROCKET 1 "notif string: ^7%s^1 was blasted to bits by a Spiderbot rocket%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_SPID_DEATH 1 "notif string: ^7%s^1 got caught in the blast of a Spiderbot explosion%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_WAKI_ROCKET 1 "notif string: ^7%s^1 couldn't find shelter from a Racer rocket%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_WAKI_DEATH 1 "notif string: ^7%s^1 got caught in the blast of a Racer explosion%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_RAPT_BOMB 1 "notif string: ^7%s^1 was caught in a Raptor cluster bomb%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_RAPT_DEATH 1 "notif string: ^7%s^1 got caught in the blast of a Raptor explosion%s%s\n^7"
+seta notification_INFO_DEATH_SELF_VH_BUMB_DEATH 1 "notif string: ^7%s^1 got caught in the blast of a Bumblebee explosion%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_TELEFRAG 1 "notif string: ^7%s%s^1 was telefragged by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_FALL 1 "notif string: ^7%s%s^1 was grounded by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_DROWN 1 "notif string: ^7%s%s^1 was drowned by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_LAVA 1 "notif string: ^7%s%s^1 was cooked by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_SLIME 1 "notif string: ^7%s%s^1 was slimed by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_SHOOTING_STAR 1 "notif string: ^7%s%s^1 was shot into space by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_SWAMP 1 "notif string: ^7%s%s^1 was preserved by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VOID 1 "notif string: ^7%s%s^1 was thrown into a world of hurt by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_TOUCHEXPLODE 1 "notif string: ^7%s%s^1 died in an accident with ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_CHEAT 1 "notif string: ^7%s%s^1 was unfairly eliminated by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_FIRE 1 "notif string: ^7%s%s^1 was burnt up into a crisp by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_CRUSH 1 "notif string: ^7%s%s^1 was crushed by ^7%s^1%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_SPID_MINIGUN 1 "notif string: ^7%s%s^1 got shredded by ^7%s^1's Spiderbot%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_SPID_ROCKET 1 "notif string: ^7%s%s^1 was blasted to bits by ^7%s^1's Spiderbot%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_SPID_DEATH 1 "notif string: ^7%s%s^1 got caught in the blast when ^7%s^1's Spiderbot exploded%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_WAKI_GUN 1 "notif string: ^7%s%s^1 was bolted down by ^7%s^1's Racer%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_WAKI_ROCKET 1 "notif string: ^7%s%s^1 couldn't find shelter from ^7%s^1's Racer%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_WAKI_DEATH 1 "notif string: ^7%s%s^1 got caught in the blast when ^7%s^1's Racer exploded%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_RAPT_CANNON 1 "notif string: ^7%s%s^1 couldn't resist ^7%s^1's purple blobs%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_RAPT_BOMB 1 "notif string: ^7%s%s^1 was cluster bombed by ^7%s^1's Raptor%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_RAPT_FRAGMENT 1 "notif string: ^7%s%s^1 was cluster bombed by ^7%s^1's Raptor%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_RAPT_DEATH 1 "notif string: ^7%s%s^1 got caught in the blast when ^7%s^1's Raptor exploded%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_BUMB_GUN 1 "notif string: ^7%s%s^1 saw the pretty lights of ^7%s^1's Bumblebee gun%s%s\n^7"
+seta notification_INFO_DEATH_MURDER_VH_BUMB_DEATH 1 "notif string: ^7%s%s^1 got caught in the blast when ^7%s^1's Bumblebee exploded%s%s\n^7"
+seta notification_INFO_FREEZETAG_ROUND_WIN_RED 1 "notif string: ^1RED^7 team wins the round, all other teams were frozen\n^7"
+seta notification_INFO_FREEZETAG_ROUND_WIN_BLUE 1 "notif string: ^4BLUE^7 team wins the round, all other teams were frozen\n^7"
+seta notification_INFO_FREEZETAG_ROUND_WIN_YELLOW 1 "notif string: ^3YELLOW^7 team wins the round, all other teams were frozen\n^7"
+seta notification_INFO_FREEZETAG_ROUND_WIN_PINK 1 "notif string: ^6PINK^7 team wins the round, all other teams were frozen\n^7"
+seta notification_INFO_FREEZETAG_REVIVE 1 "notif string: ^7%s^4 was revived by ^7%s\n^7"
+seta notification_INFO_FREEZETAG_FREEZE 1 "notif string: ^7%s^1 was frozen by ^7%s\n^7"
+seta notification_INFO_FREEZETAG_SELF 1 "notif string: ^7%s^1 froze themself\n^7"
+seta notification_INFO_GODMODE_OFF 1 "notif string: ^7Godmode saved you %s units of damage, cheater!\n^7"
+seta notification_INFO_JOIN_CONNECT 2 "notif string: ^7%s^4 connected%s\n^7"
+seta notification_INFO_JOIN_CONNECT_TEAM_RED 2 "notif string: ^7%s^4 connected and joined the ^1RED\n^7"
+seta notification_INFO_JOIN_CONNECT_TEAM_BLUE 2 "notif string: ^7%s^4 connected and joined the ^4BLUE\n^7"
+seta notification_INFO_JOIN_CONNECT_TEAM_YELLOW 2 "notif string: ^7%s^4 connected and joined the ^3YELLOW\n^7"
+seta notification_INFO_JOIN_CONNECT_TEAM_PINK 2 "notif string: ^7%s^4 connected and joined the ^6PINK\n^7"
+seta notification_INFO_JOIN_PLAY 2 "notif string: ^7%s^4 is now playing\n^7"
+seta notification_INFO_KEEPAWAY_DROPPED 1 "notif string: ^7%s^7 has dropped the ball!\n^7"
+seta notification_INFO_KEEPAWAY_PICKUP 1 "notif string: ^7%s^7 has picked up the ball!\n^7"
+seta notification_INFO_LMS_NOLIVES 1 "notif string: ^7%s^4 has no more lives left\n^7"
+seta notification_INFO_LMS_FORFEIT 1 "notif string: ^7%s^4 forfeited\n^7"
+seta notification_INFO_POWERUP_INVISIBILITY 1 "notif string: ^7%s^1 picked up Invisibility\n^7"
+seta notification_INFO_POWERUP_SHIELD 1 "notif string: ^7%s^1 picked up Shield\n^7"
+seta notification_INFO_POWERUP_SPEED 1 "notif string: ^7%s^1 picked up Speed\n^7"
+seta notification_INFO_POWERUP_STRENGTH 1 "notif string: ^7%s^1 picked up Strength\n^7"
+seta notification_INFO_QUIT_DISCONNECT 2 "notif string: ^7%s^4 disconnected\n^7"
+seta notification_INFO_QUIT_KICK_IDLING 2 "notif string: ^7%s^4 was kicked for idling\n^7"
+seta notification_INFO_QUIT_KICK_SPECTATING 1 "notif string: ^3You were kicked from the server because you are a spectator and spectators aren't allowed at the moment.\n^7"
+seta notification_INFO_QUIT_SPECTATE 2 "notif string: ^7%s^4 is now spectating\n^7"
+seta notification_INFO_RACE_FAIL 1 "notif string: TODO\n^7"
+seta notification_INFO_RACE_NEW_RECORD 1 "notif string: TODO\n^7"
+seta notification_INFO_RACE_NEW_TIME 1 "notif string: TODO\n^7"
+seta notification_INFO_RACE_NEW_RANK 1 "notif string: TODO\n^7"
+seta notification_INFO_SCORES_RED 1 "notif string: ^1RED ^7team scores!\n^7"
+seta notification_INFO_SCORES_BLUE 1 "notif string: ^4BLUE ^7team scores!\n^7"
+seta notification_INFO_SCORES_YELLOW 1 "notif string: ^3YELLOW ^7team scores!\n^7"
+seta notification_INFO_SCORES_PINK 1 "notif string: ^6PINK ^7team scores!\n^7"
+seta notification_INFO_SPECTATE_WARNING 1 "notif string: ^3You have to become a player within the next %s seconds, otherwise you will be kicked, because spectating isn't allowed at this time!\n^7"
+seta notification_INFO_SUPERWEAPON_PICKUP 1 "notif string: ^7%s^1 picked up a Superweapon\n^7"
+seta notification_INFO_VERSION_BETA 2 "notif string: ^1NOTE: ^7The server is running ^2Xonotic %s (beta)^7, you have ^3Xonotic %s\n^7"
+seta notification_INFO_VERSION_OLD 2 "notif string: ^1NOTE: ^7The server is running ^2Xonotic %s^7, you have ^3Xonotic %s\n^7"
+seta notification_INFO_VERSION_OUTDATED 2 "notif string: ^1NOTE: ^2Xonotic %s^7 is out, and you still have ^3Xonotic %s^7 - get the update from ^4http://www.xonotic.org/^7!\n^7"
+seta notification_INFO_WATERMARK 1 "notif string: ^4SVQC Build information: ^1%s\n^7"
+seta notification_INFO_WEAPON_THINKING_WITH_PORTALS 1 "notif string: ^7%s^1 is now thinking with portals%s%s\n^7"
+seta notification_INFO_WEAPON_CRYLINK_SUICIDE 1 "notif string: ^7%s^1 felt the strong pull of their Crylink%s%s\n^7"
+seta notification_INFO_WEAPON_CRYLINK_MURDER 1 "notif string: ^7%s%s^1 felt the strong pull of ^7%s^1's Crylink%s%s\n^7"
+seta notification_INFO_WEAPON_ELECTRO_SUICIDE_ORBS 1 "notif string: ^7%s^1 could not remember where they put their Electro plasma%s%s\n^7"
+seta notification_INFO_WEAPON_ELECTRO_SUICIDE_BOLT 1 "notif string: ^7%s^1 played with Electro plasma%s%s\n^7"
+seta notification_INFO_WEAPON_ELECTRO_MURDER_BOLT 1 "notif string: ^7%s%s^1 was blasted by ^7%s^1's Electro bolt%s%s\n^7"
+seta notification_INFO_WEAPON_ELECTRO_MURDER_ORBS 1 "notif string: ^7%s%s^1 got too close to ^7%s^1's Electro plasma%s%s\n^7"
+seta notification_INFO_WEAPON_ELECTRO_MURDER_COMBO 1 "notif string: ^7%s%s^1 felt the electrifying air of ^7%s^1's Electro combo%s%s\n^7"
+seta notification_INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE 1 "notif string: ^7%s^1 forgot about their firemine%s%s\n^7"
+seta notification_INFO_WEAPON_FIREBALL_SUICIDE_BLAST 1 "notif string: ^7%s^1 should have used a smaller gun%s%s\n^7"
+seta notification_INFO_WEAPON_FIREBALL_MURDER_FIREMINE 1 "notif string: ^7%s%s^1 got burnt by ^7%s^1's firemine%s%s\n^7"
+seta notification_INFO_WEAPON_FIREBALL_MURDER_BLAST 1 "notif string: ^7%s%s^1 got too close to ^7%s^1's fireball%s%s\n^7"
+seta notification_INFO_WEAPON_MORTAR_SUICIDE_EXPLODE 1 "notif string: ^7%s^1 blew themself up with their own Mortar%s%s\n^7"
+seta notification_INFO_WEAPON_MORTAR_SUICIDE_BOUNCE 1 "notif string: ^7%s^1 didn't see their own Mortar grenade%s%s\n^7"
+seta notification_INFO_WEAPON_MORTAR_MURDER_EXPLODE 1 "notif string: ^7%s%s^1 ate ^7%s^1's Mortar grenade%s%s\n^7"
+seta notification_INFO_WEAPON_MORTAR_MURDER_BOUNCE 1 "notif string: ^7%s%s^1 got too close to ^7%s^1's Mortar grenade%s%s\n^7"
+seta notification_INFO_WEAPON_HAGAR_SUICIDE 1 "notif string: ^7%s^1 played with tiny Hagar rockets%s%s\n^7"
+seta notification_INFO_WEAPON_HAGAR_MURDER_BURST 1 "notif string: ^7%s%s^1 was pummeled by a burst of ^7%s^1's Hagar rockets%s%s\n^7"
+seta notification_INFO_WEAPON_HAGAR_MURDER_SPRAY 1 "notif string: ^7%s%s^1 was pummeled by ^7%s^1's Hagar rockets%s%s\n^7"
+seta notification_INFO_WEAPON_HLAC_SUICIDE 1 "notif string: ^7%s^1 got a little jumpy with their HLAC%s%s\n^7"
+seta notification_INFO_WEAPON_HLAC_MURDER 1 "notif string: ^7%s%s^1 was cut down with ^7%s^1's HLAC%s%s\n^7"
+seta notification_INFO_WEAPON_HOOK_MURDER 1 "notif string: ^7%s%s^1 was caught in ^7%s^1's Hook gravity bomb%s%s\n^7"
+seta notification_INFO_WEAPON_LASER_SUICIDE 1 "notif string: ^7%s^1 shot themself to hell with their Laser%s%s\n^7"
+seta notification_INFO_WEAPON_LASER_MURDER 1 "notif string: ^7%s%s^1 was shot to death by ^7%s^1's Laser%s%s\n^7"
+seta notification_INFO_WEAPON_MINELAYER_SUICIDE 1 "notif string: ^7%s^1 forgot about their mine%s%s\n^7"
+seta notification_INFO_WEAPON_MINELAYER_MURDER 1 "notif string: ^7%s%s^1 got too close to ^7%s^1's mine%s%s\n^7"
+seta notification_INFO_WEAPON_MINSTANEX_MURDER 1 "notif string: ^7%s%s^1 has been vaporized by ^7%s^1's Minstanex%s%s\n^7"
+seta notification_INFO_WEAPON_NEX_MURDER 1 "notif string: ^7%s%s^1 has been vaporized by ^7%s^1's Nex%s%s\n^7"
+seta notification_INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING 1 "notif string: ^7%s%s^1 failed to hide from ^7%s^1's Rifle bullet hail%s%s\n^7"
+seta notification_INFO_WEAPON_RIFLE_MURDER_HAIL 1 "notif string: ^7%s%s^1 died in ^7%s^1's Rifle bullet hail%s%s\n^7"
+seta notification_INFO_WEAPON_RIFLE_MURDER_PIERCING 1 "notif string: ^7%s%s^1 failed to hide from ^7%s^1's Rifle%s%s\n^7"
+seta notification_INFO_WEAPON_RIFLE_MURDER 1 "notif string: ^7%s%s^1 was sniped with a Rifle by ^7%s^1%s%s\n^7"
+seta notification_INFO_WEAPON_RIFLE_MURDER_HEADSHOT 1 "notif string: ^7%s%s^1 was shot in the head with a Rifle by ^7%s^1%s%s\n^7"
+seta notification_INFO_WEAPON_ROCKETLAUNCHER_SUICIDE 1 "notif string: ^7%s^1 blew themself up with their Rocketlauncher%s%s\n^7"
+seta notification_INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT 1 "notif string: ^7%s%s^1 ate ^7%s^1's rocket%s%s\n^7"
+seta notification_INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH 1 "notif string: ^7%s%s^1 got too close ^7%s^1's rocket%s%s\n^7"
+seta notification_INFO_WEAPON_SEEKER_SUICIDE 1 "notif string: ^7%s^1 played with tiny Seeker rockets%s%s\n^7"
+seta notification_INFO_WEAPON_SEEKER_MURDER_TAG 1 "notif string: ^7%s%s^1 was tagged by ^7%s^1's Seeker%s%s\n^7"
+seta notification_INFO_WEAPON_SEEKER_MURDER_SPRAY 1 "notif string: ^7%s%s^1 was pummeled by ^7%s^1's Seeker rockets%s%s\n^7"
+seta notification_INFO_WEAPON_SHOTGUN_MURDER_SLAP 1 "notif string: ^7%s%s^1 slapped ^7%s^1 around a bit with a large Shotgun%s%s\n^7"
+seta notification_INFO_WEAPON_SHOTGUN_MURDER 1 "notif string: ^7%s%s^1 was gunned down by ^7%s^1's Shotgun%s%s\n^7"
+seta notification_INFO_WEAPON_TUBA_SUICIDE 1 "notif string: ^7%s^1 hurt their own ears with the @!#%%'n Tuba%s%s\n^7"
+seta notification_INFO_WEAPON_TUBA_MURDER 1 "notif string: ^7%s%s^1 died of ^7%s^1's great playing on the @!#%%'n Tuba%s%s\n^7"
+seta notification_INFO_WEAPON_ACCORDEON_SUICIDE 1 "notif string: ^7%s^1 hurt their own ears with the @!#%%'n Accordeon%s%s\n^7"
+seta notification_INFO_WEAPON_ACCORDEON_MURDER 1 "notif string: ^7%s%s^1 died of ^7%s^1's great playing on the @!#%%'n Accordeon%s%s\n^7"
+seta notification_INFO_WEAPON_KLEINBOTTLE_SUICIDE 1 "notif string: ^7%s^1 hurt their own ears with the @!#%%'n Klein Bottle%s%s\n^7"
+seta notification_INFO_WEAPON_KLEINBOTTLE_MURDER 1 "notif string: ^7%s%s^1 died of ^7%s^1's great playing on the @!#%%'n Klein Bottle%s%s\n^7"
+seta notification_INFO_WEAPON_UZI_MURDER_SNIPE 1 "notif string: ^7%s%s^1 was sniped by ^7%s^1's Machine Gun%s%s\n^7"
+seta notification_INFO_WEAPON_UZI_MURDER_SPRAY 1 "notif string: ^7%s%s^1 was riddled full of holes by ^7%s^1's Machine Gun%s%s\n^7"
+
+// MSG_CENTER notifications (count = 103):
+seta notification_CENTER_ASSAULT_ATTACKING 1 "notif string: ^7You are attacking!^7"
+seta notification_CENTER_ASSAULT_DEFENDING 1 "notif string: ^7You are defending!^7"
+seta notification_CENTER_CTF_CAPTURESHIELD_SHIELDED 1 "notif string: ^7You are now ^2shielded^7 from the flag\n^7for ^3too many unsuccessful attempts^7 to capture.\n^7Make some defensive scores before trying again.^7"
+seta notification_CENTER_CTF_CAPTURESHIELD_FREE 1 "notif string: ^7You are now free.\n^7Feel free to ^3try to capture^7 the flag again\n^7if you think you will succeed.^7"
+seta notification_CENTER_CTF_PASS_OTHER_RED 1 "notif string: ^7%s^7 passed the ^1RED^7 flag to %s^7"
+seta notification_CENTER_CTF_PASS_OTHER_BLUE 1 "notif string: ^7%s^7 passed the ^4BLUE^7 flag to %s^7"
+seta notification_CENTER_CTF_PASS_SENT_RED 1 "notif string: ^7You passed the ^1RED^7 flag to %s^7"
+seta notification_CENTER_CTF_PASS_SENT_BLUE 1 "notif string: ^7You passed the ^4BLUE^7 flag to %s^7"
+seta notification_CENTER_CTF_PASS_RECEIVED_RED 1 "notif string: ^7You received the ^1RED^7 flag from %s^7"
+seta notification_CENTER_CTF_PASS_RECEIVED_BLUE 1 "notif string: ^7You received the ^4BLUE^7 flag from %s^7"
+seta notification_CENTER_CTF_PASS_REQUESTING 1 "notif string: ^7Requesting %s^7 to pass you the flag^7"
+seta notification_CENTER_CTF_PASS_REQUESTED 1 "notif string: ^7%s^7 requests you to pass the flag%s^7"
+seta notification_CENTER_CTF_RETURN_RED 1 "notif string: ^7You returned the ^1RED^7 flag!^7"
+seta notification_CENTER_CTF_RETURN_BLUE 1 "notif string: ^7You returned the ^4BLUE^7 flag!^7"
+seta notification_CENTER_CTF_CAPTURE_RED 1 "notif string: ^7You captured the ^1RED^7 flag!^7"
+seta notification_CENTER_CTF_CAPTURE_BLUE 1 "notif string: ^7You captured the ^4BLUE^7 flag!^7"
+seta notification_CENTER_CTF_PICKUP_RED 1 "notif string: ^7You got the ^1RED^7 flag!^7"
+seta notification_CENTER_CTF_PICKUP_BLUE 1 "notif string: ^7You got the ^4BLUE^7 flag!^7"
+seta notification_CENTER_CTF_PICKUP_TEAM 1 "notif string: ^7Your %steam mate^7 got the flag! Protect them!^7"
+seta notification_CENTER_CTF_PICKUP_TEAM_VERBOSE 1 "notif string: ^7Your %steam mate (^7%s%s)^7 got the flag! Protect them!^7"
+seta notification_CENTER_CTF_PICKUP_ENEMY 1 "notif string: ^7The %senemy^7 got your flag! Retrieve it!^7"
+seta notification_CENTER_CTF_PICKUP_ENEMY_VERBOSE 1 "notif string: ^7The %senemy (^7%s%s)^7 got your flag! Retrieve it!^7"
+seta notification_CENTER_CTF_STALEMATE_CARRIER 1 "notif string: ^7Stalemate! Enemies can now see you on radar!^7"
+seta notification_CENTER_CTF_STALEMATE_OTHER 1 "notif string: ^7Stalemate! Flag carriers can now be seen by enemies on radar!^7"
+seta notification_CENTER_CTF_FLAG_THROW_PUNISH 1 "notif string: ^7Too many flag throws! Throwing disabled for %s.^7"
+seta notification_CENTER_DEATH_SELF_CUSTOM 1 "notif string: ^1You were %s^7"
+seta notification_CENTER_DEATH_SELF_GENERIC 1 "notif string: ^1You killed your own dumb self!^7"
+seta notification_CENTER_DEATH_SELF_VOID 1 "notif string: ^1Watch your step!^7"
+seta notification_CENTER_DEATH_SELF_SUICIDE 1 "notif string: ^1You committed suicide!^7"
+seta notification_CENTER_DEATH_SELF_NOAMMO 1 "notif string: ^1You were killed for running out of ammo...^7"
+seta notification_CENTER_DEATH_SELF_ROT 1 "notif string: ^1You grew too old without taking your medicine^7"
+seta notification_CENTER_DEATH_SELF_CAMP 1 "notif string: ^1Die camper!^7"
+seta notification_CENTER_DEATH_SELF_BETRAYAL 1 "notif string: ^1Don't shoot your team mates!^7"
+seta notification_CENTER_DEATH_SELF_TEAMCHANGE 1 "notif string: ^7You are now on: %s^7"
+seta notification_CENTER_DEATH_SELF_AUTOTEAMCHANGE 1 "notif string: ^7You have been moved into a different team\nYou are now on: %s^7"
+seta notification_CENTER_DEATH_SELF_FALL 1 "notif string: ^1You hit the ground with a crunch!^7"
+seta notification_CENTER_DEATH_SELF_DROWN 1 "notif string: ^1You couldn't catch your breath!^7"
+seta notification_CENTER_DEATH_SELF_FIRE 1 "notif string: ^1You got a little bit too crispy!^7"
+seta notification_CENTER_DEATH_SELF_LAVA 1 "notif string: ^1You couldn't stand the heat!^7"
+seta notification_CENTER_DEATH_SELF_SLIME 1 "notif string: ^1You melted away in slime!^7"
+seta notification_CENTER_DEATH_SELF_SHOOTING_STAR 1 "notif string: ^1You became a shooting star!^7"
+seta notification_CENTER_DEATH_SELF_SWAMP 1 "notif string: ^1You got stuck in a swamp!^7"
+seta notification_CENTER_DEATH_SELF_CHEAT 1 "notif string: ^1You unfairly eliminated yourself!^7"
+seta notification_CENTER_DEATH_SELF_TOUCHEXPLODE 1 "notif string: ^1You died in an accident!^7"
+seta notification_CENTER_DEATH_SELF_TURRET 1 "notif string: ^1You were fragged by a turret!^7"
+seta notification_CENTER_DEATH_SELF_TURRET_EWHEEL 1 "notif string: ^1You were fragged by an eWheel turret!^7"
+seta notification_CENTER_DEATH_SELF_TURRET_WALK 1 "notif string: ^1You were fragged by a Walker turret!^7"
+seta notification_CENTER_DEATH_SELF_VH_CRUSH 1 "notif string: ^1You were crushed by a vehicle!^7"
+seta notification_CENTER_DEATH_SELF_VH_SPID_ROCKET 1 "notif string: ^1You were blasted to bits by a Spiderbot rocket!^7"
+seta notification_CENTER_DEATH_SELF_VH_SPID_DEATH 1 "notif string: ^1You got caught in the blast of a Spiderbot explosion!^7"
+seta notification_CENTER_DEATH_SELF_VH_WAKI_ROCKET 1 "notif string: ^1You couldn't find shelter from a Racer rocket!^7"
+seta notification_CENTER_DEATH_SELF_VH_WAKI_DEATH 1 "notif string: ^1You got caught in the blast of a Racer explosion!^7"
+seta notification_CENTER_DEATH_SELF_VH_RAPT_BOMB 1 "notif string: ^1You were caught in a Raptor cluster bomb!^7"
+seta notification_CENTER_DEATH_SELF_VH_RAPT_DEATH 1 "notif string: ^1You got caught in the blast of a Raptor explosion!^7"
+seta notification_CENTER_DEATH_SELF_VH_BUMB_DEATH 1 "notif string: ^1You got caught in the blast of a Bumblebee explosion!^7"
+seta notification_CENTER_DEATH_MURDER_FRAG 1 "notif string: ^4%sYou fragged ^7%s^7"
+seta notification_CENTER_DEATH_MURDER_FRAGGED 1 "notif string: ^1%sYou were fragged by ^7%s^7"
+seta notification_CENTER_DEATH_MURDER_TYPEFRAG 1 "notif string: ^1%sYou typefragged ^7%s^7"
+seta notification_CENTER_DEATH_MURDER_TYPEFRAGGED 1 "notif string: ^1%sYou were typefragged by ^7%s^7"
+seta notification_CENTER_DEATH_MURDER_FRAG_VERBOSE 1 "notif string: ^4%sYou fragged ^7%s^7%s^7"
+seta notification_CENTER_DEATH_MURDER_FRAGGED_VERBOSE 1 "notif string: ^1%sYou were fragged by ^7%s^7%s^7"
+seta notification_CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE 1 "notif string: ^1%sYou typefragged ^7%s^7%s^7"
+seta notification_CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE 1 "notif string: ^1%sYou were typefragged by ^7%s^7%s^7"
+seta notification_CENTER_DEATH_TEAMKILL_FRAG 1 "notif string: ^1Moron! You fragged ^7%s^1, a team mate!^7"
+seta notification_CENTER_DEATH_TEAMKILL_FRAGGED 1 "notif string: ^1You were fragged by ^7%s^1, a team mate^7"
+seta notification_CENTER_DISCONNECT_IDLING 1 "notif string: ^1Stop idling!\n^7Disconnecting in ^COUNT...^7"
+seta notification_CENTER_FREEZETAG_ROUND_WIN_RED 1 "notif string: ^1RED^7 team wins the round, all other teams were frozen^7"
+seta notification_CENTER_FREEZETAG_ROUND_WIN_BLUE 1 "notif string: ^4BLUE^7 team wins the round, all other teams were frozen^7"
+seta notification_CENTER_FREEZETAG_ROUND_WIN_YELLOW 1 "notif string: ^3YELLOW^7 team wins the round, all other teams were frozen^7"
+seta notification_CENTER_FREEZETAG_ROUND_WIN_PINK 1 "notif string: ^6PINK^7 team wins the round, all other teams were frozen^7"
+seta notification_CENTER_FREEZETAG_SPAWN_LATE 1 "notif string: ^1You spawned after the round started, you'll spawn as frozen^7"
+seta notification_CENTER_FREEZETAG_REVIVE 1 "notif string: ^4You revived ^7%s^7"
+seta notification_CENTER_FREEZETAG_REVIVED 1 "notif string: ^4You were revived by ^7%s^7"
+seta notification_CENTER_FREEZETAG_SELF 1 "notif string: ^1You froze yourself^7"
+seta notification_CENTER_FREEZETAG_FREEZE 1 "notif string: ^4You froze ^7%s^7"
+seta notification_CENTER_FREEZETAG_FROZEN 1 "notif string: ^1You were frozen by ^7%s^7"
+seta notification_CENTER_KEEPAWAY_DROPPED 1 "notif string: ^7%s^7 has dropped the ball!^7"
+seta notification_CENTER_KEEPAWAY_PICKUP 1 "notif string: ^7%s^7 has picked up the ball!^7"
+seta notification_CENTER_KEEPAWAY_WARN 1 "notif string: ^7Killing people while you don't have the ball gives no points!^7"
+seta notification_CENTER_LMS_CAMPCHECK 1 "notif string: ^1Don't camp!^7"
+seta notification_CENTER_JOIN_NOSPAWNS 1 "notif string: ^1No spawnpoints available!\nHope your team can fix it...^7"
+seta notification_CENTER_JOIN_PREVENT 1 "notif string: ^1You may not join the game at this time.\nThe player limit reached maximum capacity.^7"
+seta notification_CENTER_OVERTIME_TIME 1 "notif string: ^3Now playing ^1OVERTIME^3!\nAdded ^1%s ^3minute(s) to the game!^7"
+seta notification_CENTER_OVERTIME_FRAG 1 "notif string: ^3Now playing ^1OVERTIME^3!\nKeep fragging until we have a winner!^7"
+seta notification_CENTER_POWERDOWN_INVISIBILITY 1 "notif string: ^3Invisibility has worn off^7"
+seta notification_CENTER_POWERDOWN_SHIELD 1 "notif string: ^3Shield has worn off^7"
+seta notification_CENTER_POWERDOWN_SPEED 1 "notif string: ^3Speed has worn off^7"
+seta notification_CENTER_POWERDOWN_STRENGTH 1 "notif string: ^3Strength has worn off^7"
+seta notification_CENTER_POWERUP_INVISIBILITY 1 "notif string: ^3You are invisible^7"
+seta notification_CENTER_POWERUP_SHIELD 1 "notif string: ^3Shield surrounds you^7"
+seta notification_CENTER_POWERUP_SPEED 1 "notif string: ^3You are on speed^7"
+seta notification_CENTER_POWERUP_STRENGTH 1 "notif string: ^3Strength infuses your weapons with devastating power^7"
+seta notification_CENTER_RACE_FINISHLAP 1 "notif string: ^3The race is over, finish your lap!^7"
+seta notification_CENTER_SUPERWEAPON_BROKEN 1 "notif string: ^3Superweapons have broken down^7"
+seta notification_CENTER_SUPERWEAPON_PICKUP 1 "notif string: ^3You now have a superweapon^7"
+seta notification_CENTER_SUPERWEAPON_LOST 1 "notif string: ^3Superweapons have been lost^7"
+seta notification_CENTER_TEAMCHANGE_RED 1 "notif string: ^7Changing to ^1RED^7 in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_BLUE 1 "notif string: ^7Changing to ^4BLUE^7 in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_YELLOW 1 "notif string: ^7Changing to ^3YELLOW^7 in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_PINK 1 "notif string: ^7Changing to ^6PINK^7 in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_SPECTATE 1 "notif string: ^7Spectating in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_AUTO 1 "notif string: ^7Changing team in ^COUNT^7"
+seta notification_CENTER_TEAMCHANGE_SUICIDE 1 "notif string: ^1Suicide in ^COUNT^7"
+
+// MSG_WEAPON notifications (count = 49):
+seta notification_WEAPON_THINKING_WITH_PORTALS 1 "notif string: infoname: INFO_WEAPON_THINKING_WITH_PORTALS, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_CRYLINK_SUICIDE 1 "notif string: infoname: INFO_WEAPON_CRYLINK_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_CRYLINK_MURDER 1 "notif string: infoname: INFO_WEAPON_CRYLINK_MURDER, centername: ^7"
+seta notification_WEAPON_ELECTRO_SUICIDE_ORBS 1 "notif string: infoname: INFO_WEAPON_ELECTRO_SUICIDE_ORBS, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_ELECTRO_SUICIDE_BOLT 1 "notif string: infoname: INFO_WEAPON_ELECTRO_SUICIDE_BOLT, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_ELECTRO_MURDER_BOLT 1 "notif string: infoname: INFO_WEAPON_ELECTRO_MURDER_BOLT, centername: ^7"
+seta notification_WEAPON_ELECTRO_MURDER_ORBS 1 "notif string: infoname: INFO_WEAPON_ELECTRO_MURDER_ORBS, centername: ^7"
+seta notification_WEAPON_ELECTRO_MURDER_COMBO 1 "notif string: infoname: INFO_WEAPON_ELECTRO_MURDER_COMBO, centername: ^7"
+seta notification_WEAPON_FIREBALL_SUICIDE_FIREMINE 1 "notif string: infoname: INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_FIREBALL_SUICIDE_BLAST 1 "notif string: infoname: INFO_WEAPON_FIREBALL_SUICIDE_BLAST, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_FIREBALL_MURDER_FIREMINE 1 "notif string: infoname: INFO_WEAPON_FIREBALL_MURDER_FIREMINE, centername: ^7"
+seta notification_WEAPON_FIREBALL_MURDER_BLAST 1 "notif string: infoname: INFO_WEAPON_FIREBALL_MURDER_BLAST, centername: ^7"
+seta notification_WEAPON_MORTAR_SUICIDE_EXPLODE 1 "notif string: infoname: INFO_WEAPON_MORTAR_SUICIDE_EXPLODE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_MORTAR_SUICIDE_BOUNCE 1 "notif string: infoname: INFO_WEAPON_MORTAR_SUICIDE_BOUNCE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_MORTAR_MURDER_EXPLODE 1 "notif string: infoname: INFO_WEAPON_MORTAR_MURDER_EXPLODE, centername: ^7"
+seta notification_WEAPON_MORTAR_MURDER_BOUNCE 1 "notif string: infoname: INFO_WEAPON_MORTAR_MURDER_BOUNCE, centername: ^7"
+seta notification_WEAPON_HAGAR_SUICIDE 1 "notif string: infoname: INFO_WEAPON_HAGAR_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_HAGAR_MURDER_BURST 1 "notif string: infoname: INFO_WEAPON_HAGAR_MURDER_BURST, centername: ^7"
+seta notification_WEAPON_HAGAR_MURDER_SPRAY 1 "notif string: infoname: INFO_WEAPON_HAGAR_MURDER_SPRAY, centername: ^7"
+seta notification_WEAPON_HLAC_SUICIDE 1 "notif string: infoname: INFO_WEAPON_HLAC_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_HLAC_MURDER 1 "notif string: infoname: INFO_WEAPON_HLAC_MURDER, centername: ^7"
+seta notification_WEAPON_HOOK_MURDER 1 "notif string: infoname: INFO_WEAPON_HOOK_MURDER, centername: ^7"
+seta notification_WEAPON_LASER_SUICIDE 1 "notif string: infoname: INFO_WEAPON_LASER_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_LASER_MURDER 1 "notif string: infoname: INFO_WEAPON_LASER_MURDER, centername: ^7"
+seta notification_WEAPON_MINELAYER_SUICIDE 1 "notif string: infoname: INFO_WEAPON_MINELAYER_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_MINELAYER_MURDER 1 "notif string: infoname: INFO_WEAPON_MINELAYER_MURDER, centername: ^7"
+seta notification_WEAPON_MINSTANEX_MURDER 1 "notif string: infoname: INFO_WEAPON_MINSTANEX_MURDER, centername: ^7"
+seta notification_WEAPON_NEX_MURDER 1 "notif string: infoname: INFO_WEAPON_NEX_MURDER, centername: ^7"
+seta notification_WEAPON_RIFLE_MURDER_HAIL_PIERCING 1 "notif string: infoname: INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING, centername: ^7"
+seta notification_WEAPON_RIFLE_MURDER_HAIL 1 "notif string: infoname: INFO_WEAPON_RIFLE_MURDER_HAIL, centername: ^7"
+seta notification_WEAPON_RIFLE_MURDER_PIERCING 1 "notif string: infoname: INFO_WEAPON_RIFLE_MURDER_PIERCING, centername: ^7"
+seta notification_WEAPON_RIFLE_MURDER 1 "notif string: infoname: INFO_WEAPON_RIFLE_MURDER, centername: ^7"
+seta notification_WEAPON_RIFLE_MURDER_HEADSHOT 1 "notif string: infoname: INFO_WEAPON_RIFLE_MURDER_HEADSHOT, centername: ^7"
+seta notification_WEAPON_ROCKETLAUNCHER_SUICIDE 1 "notif string: infoname: INFO_WEAPON_ROCKETLAUNCHER_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT 1 "notif string: infoname: INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT, centername: ^7"
+seta notification_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH 1 "notif string: infoname: INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH, centername: ^7"
+seta notification_WEAPON_SEEKER_SUICIDE 1 "notif string: infoname: INFO_WEAPON_SEEKER_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_SEEKER_MURDER_TAG 1 "notif string: infoname: INFO_WEAPON_SEEKER_MURDER_TAG, centername: ^7"
+seta notification_WEAPON_SEEKER_MURDER_SPRAY 1 "notif string: infoname: INFO_WEAPON_SEEKER_MURDER_SPRAY, centername: ^7"
+seta notification_WEAPON_SHOTGUN_MURDER_SLAP 1 "notif string: infoname: INFO_WEAPON_SHOTGUN_MURDER_SLAP, centername: ^7"
+seta notification_WEAPON_SHOTGUN_MURDER 1 "notif string: infoname: INFO_WEAPON_SHOTGUN_MURDER, centername: ^7"
+seta notification_WEAPON_TUBA_SUICIDE 1 "notif string: infoname: INFO_WEAPON_TUBA_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_TUBA_MURDER 1 "notif string: infoname: INFO_WEAPON_TUBA_MURDER, centername: ^7"
+seta notification_WEAPON_ACCORDEON_SUICIDE 1 "notif string: infoname: INFO_WEAPON_ACCORDEON_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_ACCORDEON_MURDER 1 "notif string: infoname: INFO_WEAPON_ACCORDEON_MURDER, centername: ^7"
+seta notification_WEAPON_KLEINBOTTLE_SUICIDE 1 "notif string: infoname: INFO_WEAPON_KLEINBOTTLE_SUICIDE, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_WEAPON_KLEINBOTTLE_MURDER 1 "notif string: infoname: INFO_WEAPON_KLEINBOTTLE_MURDER, centername: ^7"
+seta notification_WEAPON_UZI_MURDER_SNIPE 1 "notif string: infoname: INFO_WEAPON_UZI_MURDER_SNIPE, centername: ^7"
+seta notification_WEAPON_UZI_MURDER_SPRAY 1 "notif string: infoname: INFO_WEAPON_UZI_MURDER_SPRAY, centername: ^7"
+
+// MSG_DEATH notifications (count = 63):
+seta notification_DEATH_SELF_CUSTOM 1 "notif string: infoname: INFO_DEATH_SELF_GENERIC, centername: CENTER_DEATH_SELF_CUSTOM^7"
+seta notification_DEATH_SELF_GENERIC 1 "notif string: infoname: INFO_DEATH_SELF_GENERIC, centername: CENTER_DEATH_SELF_GENERIC^7"
+seta notification_DEATH_SELF_VOID 1 "notif string: infoname: INFO_DEATH_SELF_VOID, centername: CENTER_DEATH_SELF_VOID^7"
+seta notification_DEATH_SELF_SUICIDE 1 "notif string: infoname: INFO_DEATH_SELF_SUICIDE, centername: CENTER_DEATH_SELF_SUICIDE^7"
+seta notification_DEATH_SELF_NOAMMO 1 "notif string: infoname: INFO_DEATH_SELF_NOAMMO, centername: CENTER_DEATH_SELF_NOAMMO^7"
+seta notification_DEATH_SELF_ROT 1 "notif string: infoname: INFO_DEATH_SELF_ROT, centername: CENTER_DEATH_SELF_ROT^7"
+seta notification_DEATH_SELF_CAMP 1 "notif string: infoname: INFO_DEATH_SELF_CAMP, centername: CENTER_DEATH_SELF_CAMP^7"
+seta notification_DEATH_SELF_BETRAYAL 1 "notif string: infoname: INFO_DEATH_SELF_BETRAYAL, centername: CENTER_DEATH_SELF_BETRAYAL^7"
+seta notification_DEATH_SELF_TEAMCHANGE 1 "notif string: infoname: INFO_DEATH_SELF_TEAMCHANGE, centername: CENTER_DEATH_SELF_TEAMCHANGE^7"
+seta notification_DEATH_SELF_AUTOTEAMCHANGE 1 "notif string: infoname: INFO_DEATH_SELF_AUTOTEAMCHANGE, centername: CENTER_DEATH_SELF_AUTOTEAMCHANGE^7"
+seta notification_DEATH_SELF_FALL 1 "notif string: infoname: INFO_DEATH_SELF_FALL, centername: CENTER_DEATH_SELF_FALL^7"
+seta notification_DEATH_SELF_DROWN 1 "notif string: infoname: INFO_DEATH_SELF_DROWN, centername: CENTER_DEATH_SELF_DROWN^7"
+seta notification_DEATH_SELF_FIRE 1 "notif string: infoname: INFO_DEATH_SELF_FIRE, centername: CENTER_DEATH_SELF_FIRE^7"
+seta notification_DEATH_SELF_LAVA 1 "notif string: infoname: INFO_DEATH_SELF_LAVA, centername: CENTER_DEATH_SELF_LAVA^7"
+seta notification_DEATH_SELF_SLIME 1 "notif string: infoname: INFO_DEATH_SELF_SLIME, centername: CENTER_DEATH_SELF_SLIME^7"
+seta notification_DEATH_SELF_SHOOTING_STAR 1 "notif string: infoname: INFO_DEATH_SELF_SHOOTING_STAR, centername: CENTER_DEATH_SELF_SHOOTING_STAR^7"
+seta notification_DEATH_SELF_SWAMP 1 "notif string: infoname: INFO_DEATH_SELF_SWAMP, centername: CENTER_DEATH_SELF_SWAMP^7"
+seta notification_DEATH_SELF_CHEAT 1 "notif string: infoname: INFO_DEATH_SELF_CHEAT, centername: CENTER_DEATH_SELF_CHEAT^7"
+seta notification_DEATH_SELF_TOUCHEXPLODE 1 "notif string: infoname: INFO_DEATH_SELF_TOUCHEXPLODE, centername: CENTER_DEATH_SELF_TOUCHEXPLODE^7"
+seta notification_DEATH_SELF_TURRET 1 "notif string: infoname: INFO_DEATH_SELF_TURRET, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_EWHEEL 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_EWHEEL, centername: CENTER_DEATH_SELF_TURRET_EWHEEL^7"
+seta notification_DEATH_SELF_TURRET_FLAC 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_FLAC, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_MACHINEGUN 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_MACHINEGUN, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_WALK_GUN 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_WALK_GUN, centername: CENTER_DEATH_SELF_TURRET_WALK^7"
+seta notification_DEATH_SELF_TURRET_WALK_MEELE 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_WALK_MEELE, centername: CENTER_DEATH_SELF_TURRET_WALK^7"
+seta notification_DEATH_SELF_TURRET_WALK_ROCKET 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_WALK_ROCKET, centername: CENTER_DEATH_SELF_TURRET_WALK^7"
+seta notification_DEATH_SELF_TURRET_HELLION 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_HELLION, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_HK 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_HK, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_MLRS 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_MLRS, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_PLASMA 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_PLASMA, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_PHASER 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_PHASER, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_TURRET_TESLA 1 "notif string: infoname: INFO_DEATH_SELF_TURRET_TESLA, centername: CENTER_DEATH_SELF_TURRET^7"
+seta notification_DEATH_SELF_VH_CRUSH 1 "notif string: infoname: INFO_DEATH_SELF_VH_CRUSH, centername: CENTER_DEATH_SELF_VH_CRUSH^7"
+seta notification_DEATH_SELF_VH_SPID_ROCKET 1 "notif string: infoname: INFO_DEATH_SELF_VH_SPID_ROCKET, centername: CENTER_DEATH_SELF_VH_SPID_ROCKET^7"
+seta notification_DEATH_SELF_VH_SPID_DEATH 1 "notif string: infoname: INFO_DEATH_SELF_VH_SPID_DEATH, centername: CENTER_DEATH_SELF_VH_SPID_DEATH^7"
+seta notification_DEATH_SELF_VH_WAKI_ROCKET 1 "notif string: infoname: INFO_DEATH_SELF_VH_WAKI_ROCKET, centername: CENTER_DEATH_SELF_VH_WAKI_ROCKET^7"
+seta notification_DEATH_SELF_VH_WAKI_DEATH 1 "notif string: infoname: INFO_DEATH_SELF_VH_WAKI_DEATH, centername: CENTER_DEATH_SELF_VH_WAKI_DEATH^7"
+seta notification_DEATH_SELF_VH_RAPT_BOMB 1 "notif string: infoname: INFO_DEATH_SELF_VH_RAPT_BOMB, centername: CENTER_DEATH_SELF_VH_RAPT_BOMB^7"
+seta notification_DEATH_SELF_VH_RAPT_DEATH 1 "notif string: infoname: INFO_DEATH_SELF_VH_RAPT_DEATH, centername: CENTER_DEATH_SELF_VH_RAPT_DEATH^7"
+seta notification_DEATH_SELF_VH_BUMB_DEATH 1 "notif string: infoname: INFO_DEATH_SELF_VH_BUMB_DEATH, centername: CENTER_DEATH_SELF_VH_BUMB_DEATH^7"
+seta notification_DEATH_MURDER_TELEFRAG 1 "notif string: infoname: INFO_DEATH_MURDER_TELEFRAG, centername: ^7"
+seta notification_DEATH_MURDER_FALL 1 "notif string: infoname: INFO_DEATH_MURDER_FALL, centername: ^7"
+seta notification_DEATH_MURDER_DROWN 1 "notif string: infoname: INFO_DEATH_MURDER_DROWN, centername: ^7"
+seta notification_DEATH_MURDER_LAVA 1 "notif string: infoname: INFO_DEATH_MURDER_LAVA, centername: ^7"
+seta notification_DEATH_MURDER_SLIME 1 "notif string: infoname: INFO_DEATH_MURDER_SLIME, centername: ^7"
+seta notification_DEATH_MURDER_SHOOTING_STAR 1 "notif string: infoname: INFO_DEATH_MURDER_SHOOTING_STAR, centername: ^7"
+seta notification_DEATH_MURDER_SWAMP 1 "notif string: infoname: INFO_DEATH_MURDER_SWAMP, centername: ^7"
+seta notification_DEATH_MURDER_VOID 1 "notif string: infoname: INFO_DEATH_MURDER_VOID, centername: ^7"
+seta notification_DEATH_MURDER_TOUCHEXPLODE 1 "notif string: infoname: INFO_DEATH_MURDER_TOUCHEXPLODE, centername: ^7"
+seta notification_DEATH_MURDER_CHEAT 1 "notif string: infoname: INFO_DEATH_MURDER_CHEAT, centername: ^7"
+seta notification_DEATH_MURDER_FIRE 1 "notif string: infoname: INFO_DEATH_MURDER_FIRE, centername: ^7"
+seta notification_DEATH_MURDER_VH_CRUSH 1 "notif string: infoname: INFO_DEATH_MURDER_VH_CRUSH, centername: ^7"
+seta notification_DEATH_MURDER_VH_SPID_MINIGUN 1 "notif string: infoname: INFO_DEATH_MURDER_VH_SPID_MINIGUN, centername: ^7"
+seta notification_DEATH_MURDER_VH_SPID_ROCKET 1 "notif string: infoname: INFO_DEATH_MURDER_VH_SPID_ROCKET, centername: ^7"
+seta notification_DEATH_MURDER_VH_SPID_DEATH 1 "notif string: infoname: INFO_DEATH_MURDER_VH_SPID_DEATH, centername: ^7"
+seta notification_DEATH_MURDER_VH_WAKI_GUN 1 "notif string: infoname: INFO_DEATH_MURDER_VH_WAKI_GUN, centername: ^7"
+seta notification_DEATH_MURDER_VH_WAKI_ROCKET 1 "notif string: infoname: INFO_DEATH_MURDER_VH_WAKI_ROCKET, centername: ^7"
+seta notification_DEATH_MURDER_VH_WAKI_DEATH 1 "notif string: infoname: INFO_DEATH_MURDER_VH_WAKI_DEATH, centername: ^7"
+seta notification_DEATH_MURDER_VH_RAPT_CANNON 1 "notif string: infoname: INFO_DEATH_MURDER_VH_RAPT_CANNON, centername: ^7"
+seta notification_DEATH_MURDER_VH_RAPT_BOMB 1 "notif string: infoname: INFO_DEATH_MURDER_VH_RAPT_BOMB, centername: ^7"
+seta notification_DEATH_MURDER_VH_RAPT_DEATH 1 "notif string: infoname: INFO_DEATH_MURDER_VH_RAPT_DEATH, centername: ^7"
+seta notification_DEATH_MURDER_VH_BUMB_GUN 1 "notif string: infoname: INFO_DEATH_MURDER_VH_BUMB_GUN, centername: ^7"
+seta notification_DEATH_MURDER_VH_BUMB_DEATH 1 "notif string: infoname: INFO_DEATH_MURDER_VH_BUMB_DEATH, centername: ^7"
+
+// HARD CODED notification variables:
+seta notification_allow_chatboxprint 1 "Allow notifications to be printed to chat box by setting notification cvar to 2 (You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
+seta notification_show_location 0 "Append location information to MSG_INFO death/kill messages"
+seta notification_show_location_string "" "Replacement string piped into sprintf, so you can do different messages like this: ' at the %s' or ' (near %s)'"
+seta notification_show_sprees 1 "Print information about sprees in death/kill messages"
+seta notification_show_sprees_center 1 "Show spree information in MSG_CENTER messages... 0 = off, 1 = target (but only for first victim) and attacker"
+seta notification_show_sprees_center_specialonly 1 "Don't show spree information in MSG_CENTER messages if it isn't an achievement"
+seta notification_show_sprees_info 3 "Show spree information in MSG_INFO messages... 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker"
+seta notification_show_sprees_info_newline 0 "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
+seta notification_show_sprees_info_specialonly 1 "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
+seta notification_errors_are_fatal 1 "If a notification fails upon initialization, cause a Host_Error to stop the program"
+seta notification_ctf_pickup_team_verbose 1 "Show extra information if a team mate picks up a flag"
+seta notification_ctf_pickup_enemy_verbose 1 "Show extra information if an enemy picks up a flag"
+seta notification_ctf_capture_verbose 1 "Show extra information when someone captures a flag"
+seta notification_frag_verbose 1 "Show extra information when you frag someone (or when you are fragged"
+
+// Notification counts (total = 398): MSG_INFO = 183, MSG_CENTER = 103, MSG_WEAPON = 49, MSG_DEATH = 63
index 5d079dcb05d7d62c96810b82204005d3a1f9543e..4f772589ba3eeaba45f157e742aac84a497f3b11 100644 (file)
@@ -33,6 +33,8 @@ QCCFLAGS ?= \
        -floop-labels \
        -funtyped-nil \
        -fno-permissive \
+       -fvariadic-args \
+       -DNOTIFICATIONS_DEBUG \
        $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
 else
 # this. is. fteqccccccccccccccccccc!
index d7f65c6ecdc4369988dbca5f08c08618362f0859..44c5c572aaeb97f6cfdebe3aaba977493b747710 100644 (file)
@@ -149,12 +149,14 @@ void CSQC_Init(void)
        teams = Sort_Spawn();
        players = Sort_Spawn();
 
-       GetTeam(COLOR_SPECTATOR, true); // add specs first
+       GetTeam(FL_SPECTATOR, true); // add specs first
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
-
+       CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
+       CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+       
        WaypointSprite_Load();
 
        // precaches
@@ -261,16 +263,16 @@ float SetTeam(entity o, float Team)
                switch(Team)
                {
                        case -1:
-                       case COLOR_TEAM1:
-                       case COLOR_TEAM2:
-                       case COLOR_TEAM3:
-                       case COLOR_TEAM4:
+                       case FL_TEAM_1:
+                       case FL_TEAM_2:
+                       case FL_TEAM_3:
+                       case FL_TEAM_4:
                                break;
                        default:
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = COLOR_SPECTATOR;
+                                       Team = FL_SPECTATOR;
                                }
                                break;
                }
@@ -286,7 +288,7 @@ float SetTeam(entity o, float Team)
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = COLOR_SPECTATOR;
+                                       Team = FL_SPECTATOR;
                                }
                                break;
                }
@@ -779,7 +781,8 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_TURRET: ent_turret(); break; 
                case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
                case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
-               case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;  
+               case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;
+               case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
                        error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
@@ -1194,14 +1197,6 @@ float CSQC_Parse_TempEntity()
                        Announcer_Play(ReadString());
                        bHandled = true;
                        break;
-               case TE_CSQC_KILLNOTIFY:
-                       HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
-                       bHandled = true;
-                       break;
-               case TE_CSQC_KILLCENTERPRINT:
-                       HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
-                       bHandled = true;
-                       break;
                case TE_CSQC_CENTERPRINT_GENERIC:
                        float id;
                        string s;
index dac205e723f0bd607b0313b495a1afedf52d4b11..c84d58b546fc043f3ce4a32ee0881c0db07b74c8 100644 (file)
@@ -249,7 +249,7 @@ float EnemyHitCheck()
        if(teamplay)
                if(t == myteam)
                        return SHOTTYPE_HITTEAM;
-       if(t == COLOR_SPECTATOR)
+       if(t == FL_SPECTATOR)
                return SHOTTYPE_HITWORLD;
        return SHOTTYPE_HITENEMY;
 }
index c7f7e9f279dd8c7806da4a85de89c51f78ceb39b..ba6abadc018868762228d1875b5180244fe9ce2a 100644 (file)
@@ -254,7 +254,6 @@ float autocvar_hud_panel_notify;
 float autocvar_hud_panel_notify_fadetime;
 float autocvar_hud_panel_notify_flip;
 float autocvar_hud_panel_notify_fontsize;
-float autocvar_hud_panel_notify_print;
 float autocvar_hud_panel_notify_time;
 float autocvar_hud_panel_physics;
 float autocvar_hud_panel_physics_acceleration_progressbar_mode;
index 1f8306e7675f4609b13f75777821ff12ad27902f..0f5c2700fbcffa0c3bba7786af64ffbf65c6e506 100644 (file)
@@ -218,7 +218,7 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
                entity tm;
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
-                       if(tm.team != COLOR_SPECTATOR)
+                       if(tm.team != FL_SPECTATOR)
                                ++teams_count;
 
                if(autocvar_cl_forcemyplayercolors)
index cc89b03d79d290420202ccdc083209617ddb0100..bbc8f88043453a3e0338b02fccbfef6d00955ba2 100644 (file)
@@ -211,43 +211,43 @@ void Ent_DamageInfo(float isNew)
                
                switch(w_deathtype)
                {
-                       case DEATH_VHCRUSH:
+                       case DEATH_VH_CRUSH:
                                break;
                                
                        // spiderbot
-                       case DEATH_SBMINIGUN:
+                       case DEATH_VH_SPID_MINIGUN:
                                string _snd;
                                _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_SBROCKET:
+                       case DEATH_VH_SPID_ROCKET:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_SBBLOWUP:
+                       case DEATH_VH_SPID_DEATH:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
             
-                       case DEATH_WAKIGUN:
+                       case DEATH_VH_WAKI_GUN:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_WAKIROCKET:
+                       case DEATH_VH_WAKI_ROCKET:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_WAKIBLOWUP:
+                       case DEATH_VH_WAKI_DEATH:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
                                
-                       case DEATH_RAPTOR_CANNON:
+                       case DEATH_VH_RAPT_CANNON:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_RAPTOR_BOMB_SPLIT:
+                       case DEATH_VH_RAPT_FRAGMENT:
                                float i;
                                vector ang, vel;
                                for(i = 1; i < 4; ++i)
@@ -259,15 +259,15 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_RAPTOR_BOMB:
+                       case DEATH_VH_RAPT_BOMB:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_RAPTOR_DEATH:
+                       case DEATH_VH_RAPT_DEATH:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
-                       case DEATH_BUMB_GUN:
+                       case DEATH_VH_BUMB_GUN:
                                sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
                                break;
@@ -301,14 +301,14 @@ void Ent_DamageInfo(float isNew)
                                
                         case DEATH_TURRET_MLRS:
                         case DEATH_TURRET_HK:
-                        case DEATH_TURRET_WALKER_ROCKET:
+                        case DEATH_TURRET_WALK_ROCKET:
                         case DEATH_TURRET_HELLION:
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
                                break;
                         
                         case DEATH_TURRET_MACHINEGUN:
-                        case DEATH_TURRET_WALKER_GUN:
+                        case DEATH_TURRET_WALK_GUN:
                                _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTN_NORM);
                                pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
@@ -319,7 +319,7 @@ void Ent_DamageInfo(float isNew)
                                pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
                                break;
                                                  
-                        case DEATH_TURRET_WALKER_MEELE:
+                        case DEATH_TURRET_WALK_MEELE:
                                sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_MIN);
                                pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
                                break;
index 1c2894afa2bf1e00bd548260b33f6534729985a8..72b87ca4e411eeb08e6d7de48435c2bd33395e96 100644 (file)
@@ -129,22 +129,22 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        intensity = 1;
                        offset = 0;
-                       if(t == COLOR_TEAM1)
+                       if(t == FL_TEAM_1)
                        {
                                tex = "particles/hook_red";
                                rgb = '1 .3 .3';
                        }
-                       else if(t == COLOR_TEAM2)
+                       else if(t == FL_TEAM_2)
                        {
                                tex = "particles/hook_blue";
                                rgb = '.3 .3 1';
                        }
-                       else if(t == COLOR_TEAM3)
+                       else if(t == FL_TEAM_3)
                        {
                                tex = "particles/hook_yellow";
                                rgb = '1 1 .3';
                        }
-                       else if(t == COLOR_TEAM4)
+                       else if(t == FL_TEAM_4)
                        {
                                tex = "particles/hook_pink";
                                rgb = '1 .3 1';
index afa6f23da9c88865623443d1cc94364fa9d17662..f262b0e266d4b0f1a6a37d357c3081f3c70bbe14 100644 (file)
@@ -154,18 +154,6 @@ void drawstringcenter(vector position, string text, vector scale, vector rgb, fl
        drawstring(position, text, scale, rgb, theAlpha, flag);
 }
 
-// return the string of the given race place
-string race_PlaceName(float pos) {
-       if(pos == 1)
-               return _("1st");
-       else if(pos == 2)
-               return _("2nd");
-       else if(pos == 3)
-               return _("3rd");
-       else
-               return sprintf(_("%dth"), pos);
-}
-
 // return the string of the onscreen race timer
 string MakeRaceString(float cp, float mytime, float histime, float lapdelta, string hisname)
 {
@@ -244,6 +232,30 @@ float race_CheckName(string net_name) {
        return 0;
 }
 
+float GetPlayerColorForce(float i)
+{
+       if(!teamplay)
+               return 0;
+       else
+               return stof(getplayerkeyvalue(i, "colors")) & 15;
+}
+
+float GetPlayerColor(float i)
+{
+       if not(playerslots[i].gotscores) // unconnected
+               return FL_SPECTATOR;
+       else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
+               return FL_SPECTATOR;
+       else
+               return GetPlayerColorForce(i);
+}
+
+string GetPlayerName(float i)
+{
+       return ColorTranslateRGB(getplayerkeyvalue(i, "name"));
+}
+
+
 /*
 ==================
 HUD panels
@@ -1631,541 +1643,29 @@ string Weapon_KillMessage(float deathtype)
        return w_deathtypestring;
 }
 
-#define KN_MAX_ENTRIES 10
-float kn_index;
-float killnotify_times[KN_MAX_ENTRIES];
-float killnotify_deathtype[KN_MAX_ENTRIES];
-float killnotify_actiontype[KN_MAX_ENTRIES]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
-string killnotify_attackers[KN_MAX_ENTRIES];
-string killnotify_victims[KN_MAX_ENTRIES];
-void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float wpn)
+void HUD_Notify_Push(string icon, string attacker, string victim)
 {
-       --kn_index;
-       if (kn_index == -1)
-               kn_index = KN_MAX_ENTRIES-1;
-       killnotify_times[kn_index] = time;
-       killnotify_deathtype[kn_index] = wpn;
-       killnotify_actiontype[kn_index] = actiontype;
-       if(killnotify_attackers[kn_index])
-               strunzone(killnotify_attackers[kn_index]);
-       killnotify_attackers[kn_index] = strzone(attacker);
-       if(killnotify_victims[kn_index])
-               strunzone(killnotify_victims[kn_index]);
-       killnotify_victims[kn_index] = strzone(victim);
-}
+       if(icon != "")
+       {
+               --kn_index;
+               if (kn_index == -1) { kn_index = KN_MAX_ENTRIES-1; }
+               notify_times[kn_index] = time;
 
-void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
-{
-       float w;
-       float alsoprint, gentle;
-       alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
-       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
-       
-       if ((msg == MSG_SUICIDE || msg == MSG_KILL || msg == MSG_KILL_ACTION) && gametype == MAPINFO_TYPE_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel
-               return;
+               // icon
+               if(notify_icon[kn_index]) { strunzone(notify_icon[kn_index]); }
+               notify_icon[kn_index] = strzone(icon);
 
-       if(msg == MSG_SUICIDE) {
-               w = DEATH_WEAPONOF(type);
-               if(WEP_VALID(w)) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if (alsoprint)
-                               print("^1", sprintf(Weapon_SuicideMessage(type), strcat(s1, "^1")), "\n");
-               } else if (type == DEATH_KILL) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_KILL);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 couldn't take it anymore\n"), s1));
-               } else if (type == DEATH_ROT) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 died\n"), s1));
-               } else if (type == DEATH_NOAMMO) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_NOAMMO);
-                       if (alsoprint)
-                               print (sprintf(_("^7%s^7 committed suicide. What's the point of living without ammo?\n"), s1));
-               } else if (type == DEATH_CAMP) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_CAMP);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 thought they found a nice camping ground\n"), s1));
-               } else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
-                       HUD_KillNotify_Push(s1, "", 0, type);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 didn't become friends with the Lord of Teamplay\n"), s1));
-               } else if (type == DEATH_CHEAT) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 unfairly eliminated themself\n"), s1));
-               } else if (type == DEATH_FIRE) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 burned to death\n"), s1));
-               } else if (type != DEATH_TEAMCHANGE && type != DEATH_QUIET) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if (alsoprint)
-                               print (sprintf(_("^1%s^1 couldn't resist the urge to self-destruct\n"), s1));
-               } 
-               
-               if (stof(s2) > 2) // killcount > 2
-                       print (sprintf(_("^1%s^1 ended it all after a %d kill spree\n"), s1, stof(s2)));
-       } else if(msg == MSG_KILL) {
-               w = DEATH_WEAPONOF(type);
-               if(WEP_VALID(w)) {
-                       HUD_KillNotify_Push(s1, s2, 1, type);
-                       if (alsoprint)
-                               print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer
-               }
-               else if(type == KILL_TEAM_RED || type == KILL_TEAM_BLUE || type == KILL_TEAM_SPREE) {
-                       HUD_KillNotify_Push(s1, s2, 1, type);
-                       if(alsoprint)
-                       {
-                               if(gentle) {
-                                       print (sprintf(_("^1%s^1 took action against a team mate\n"), s1));
-                               } else {
-                                       print (sprintf(_("^1%s^1 mows down a team mate\n"), s1));
-                               }
-                       }
-                       if (stof(s2) > 2 && type == KILL_TEAM_SPREE) {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 ended a %d scoring spree by going against a team mate\n"), s1, stof(s3)));
-                               else
-                                       print (sprintf(_("^1%s^1 ended a %d kill spree by killing a team mate\n"), s1, stof(s3)));
-                       }
-                       else if (stof(s2) > 2) {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1's %s scoring spree was ended by a team mate!\n"), s1, stof(s3)));
-                               else
-                                       print (sprintf(_("^1%s^1's %s kill spree was ended by a team mate!\n"), s1, stof(s3)));
-                       }
-               }
-               else if(type == KILL_FIRST_BLOOD)
-                       print(sprintf(_("^1%s^1 drew first blood\n"), s1));
-               else if (type == DEATH_TELEFRAG) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_TELEFRAG);
-                       if(gentle)
-                               print (sprintf(_("^1%s^1 tried to occupy %s^1's teleport destination space\n"), s2, s1));
-                       else
-                               print (sprintf(_("^1%s^1 was telefragged by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_DROWN) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_DROWN);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was drowned by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_SLIME) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_SLIME);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was slimed by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_LAVA) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_LAVA);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was cooked by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_FALL) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_FALL);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was grounded by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_SHOOTING_STAR) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_SHOOTING_STAR);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was shot into space by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_SWAMP) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was conserved by %s\n"), s2, s1));
-               }
-               else if (type == DEATH_HURTTRIGGER)
-               {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER);
-                       if(alsoprint)
-                               print(sprintf(_("^1%s^1 was thrown into a world of hurt by %s\n"), s2, s1));
-               } else if(type == DEATH_VHCRUSH) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was crushed by %s\n"), s2, s1));
-               } else if(type == DEATH_SBMINIGUN) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 got shredded by %s\n"), s2, s1));
-               } else if(type == DEATH_SBROCKET) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was blasted to bits by %s\n"), s2, s1));
-               } else if(type == DEATH_SBBLOWUP) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
-               } else if(type == DEATH_WAKIGUN) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was bolted down by %s\n"), s2, s1));
-               } else if(type == DEATH_BUMB_GUN) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 saw %s's preddy lights.\n"), s2, s1));
-               } else if(type == DEATH_WAKIROCKET) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 could find no shelter from %s^1's rockets\n"), s2, s1));
-               } else if(type == DEATH_WAKIBLOWUP) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
-               } else if(type == DEATH_RAPTOR_CANNON) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 nailed to hell by %s\n"), s2, s1));
-               } else if(type == DEATH_RAPTOR_BOMB) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 cluster crushed by %s\n"), s2, s1));
-               } else if(type == DEATH_RAPTOR_DEATH) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
-               } else if(type == DEATH_TURRET) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was pushed into the line of fire by %s\n"), s2, s1));
-               } else if(type == DEATH_TOUCHEXPLODE) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was pushed into an accident by %s\n"), s2, s1));
-               } else if(type == DEATH_CHEAT) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was unfairly eliminated by %s\n"), s2, s1));
-               } else if (type == DEATH_FIRE) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was burnt to death by %s\n"), s2, s1));
-               } else if (type == DEATH_CUSTOM) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_CUSTOM);
-                       if(alsoprint)
-                               print("^1", sprintf(s3, strcat(s2, "^1"), strcat(s1, "^1")), "\n");
-               } else if (type == DEATH_HURTTRIGGER) {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER);
-                       if(alsoprint)
-                               print("^1", sprintf(s3, strcat(s2, "^1"), strcat(s1, "^1")), "\n");
-               } else {
-                       HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was fragged by %s\n"), s2, s1));
-               }
-       } else if(msg == MSG_SPREE) {
-               if(type == KILL_END_SPREE) {
-                       if(gentle)
-                               print (sprintf(_("^1%s^1's %s scoring spree was ended by %s\n"), s1, s2, s3));
-                       else
-                               print (sprintf(_("^1%s^1's %s kill spree was ended by %s\n"), s1, s2, s3));
-               } else if(type == KILL_SPREE) {
-                       if(gentle)
-                               print (sprintf(_("^1%s^1 made %s scores in a row\n"), s1, s2));
-                       else
-                               print (sprintf(_("^1%s^1 has %s frags in a row\n"), s1, s2));
-               } else if(type == KILL_SPREE_3) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made a ^1TRIPLE SCORE\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 made a ^1TRIPLE FRAG\n"), s1));
-               } else if(type == KILL_SPREE_5) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 unleashes ^1SCORING RAGE\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 unleashes ^1RAGE\n"), s1));
-               } else if(type == KILL_SPREE_10) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made ^1TEN SCORES IN A ROW!\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 starts the ^1MASSACRE!\n"), s1));
-               } else if(type == KILL_SPREE_15) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made ^1FIFTEEN SCORES IN A ROW!\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 executes ^1MAYHEM!\n"), s1));
-               } else if(type == KILL_SPREE_20) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made ^1TWENTY SCORES IN A ROW!\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 is a ^1BERSERKER!\n"), s1));
-               } else if(type == KILL_SPREE_25) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made ^1TWENTY FIVE SCORES IN A ROW!\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 inflicts ^1CARNAGE!\n"), s1));
-               } else if(type == KILL_SPREE_30) {
-                       if(gentle)
-                               print (sprintf(_("%s^7 made ^1THIRTY SCORES IN A ROW!\n"), s1));
-                       else
-                               print (sprintf(_("%s^7 unleashes ^1ARMAGEDDON!\n"), s1));
-               }
-       } else if(msg == MSG_KILL_ACTION) { // wtf is this? isnt it basically the same as MSG_SUICIDE?
-               if (type == DEATH_DROWN) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_DROWN);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 was in the water for too long\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 drowned\n"), s1));
-                       }
-               } else if (type == DEATH_SLIME) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_SLIME);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was slimed\n"), s1));
-               } else if (type == DEATH_LAVA) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_LAVA);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 found a hot place\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 turned into hot slag\n"), s1));
-                       }
-               } else if (type == DEATH_FALL) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 tested gravity (and it worked)\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 hit the ground with a crunch\n"), s1));
-                       }
-               } else if (type == DEATH_SHOOTING_STAR) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_SHOOTING_STAR);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 became a shooting star\n"), s1));
-               } else if (type == DEATH_SWAMP) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 discovered a swamp\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 is now conserved for centuries to come\n"), s1));
-                       }
-               } else if(DEATH_ISTURRET(type)) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 ran into a turret\n"), s1));
-                               else
-                               {
-                                       switch(type)
-                                       {
-                                               case DEATH_TURRET_EWHEEL:
-                                                       print (sprintf(_("^1%s^1 was laserd down by a eWheel turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_FLAC:
-                                                       print (sprintf(_("^1%s^1 got caught in the flac \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_MACHINEGUN:
-                                                       print (sprintf(_("^1%s^1 was riddeld full of riddled by a machinegun turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_WALKER_GUN:
-                                                       print (sprintf(_("^1%s^1 got served a led enrichment by a walker turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_WALKER_MEELE:
-                                                       print (sprintf(_("^1%s^1 was impaled by a walker turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_WALKER_ROCKET:
-                                                       print (sprintf(_("^1%s^1 was rocketed to hell by a walker turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_HELLION:
-                                                       print (sprintf(_("^1%s^1 was blasted away hellion turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_HK:
-                                                       print (sprintf(_("^1%s^1 could not hide from the hunter turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_MLRS:
-                                                       print (sprintf(_("^1%s^1 got turned into smoldering gibs by a mlrs turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_PLASMA:
-                                                       print (sprintf(_("^1%s^1 got served some superheated plasma from a plasma turret \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_PHASER:
-                                                       print (sprintf(_("^1%s^1 was phased out \n"), s1));
-                                                       break;
-                                               case DEATH_TURRET_TESLA:                        
-                                                       print (sprintf(_("^1%s^1 was electrocuted by a tesla turret \n"), s1));
-                                                       break;
-                                       }
-                               }
-                       }
-               } else if (type == DEATH_CUSTOM) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_CUSTOM);
-                       if(alsoprint)
-                               print("^1", sprintf(s2, strcat(s1, "^1")), "\n");
-               } else if (type == DEATH_HURTTRIGGER) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_HURTTRIGGER);
-                       if(alsoprint)
-                               print("^1", sprintf(s2, strcat(s1, "^1")), "\n");
-               } else if(type == DEATH_TOUCHEXPLODE) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 died in an accident\n"), s1));
-               } else if(type == DEATH_CHEAT) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                               print (sprintf(_("^1%s^1 was unfairly eliminated\n"), s1));
-               } else if(type == DEATH_FIRE) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 felt a little hot\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 burnt to death\n"), s1));
-                               }
-               } else {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 needs a restart\n"), s1));
-                               else
-                                       print (sprintf(_("^1%s^1 died\n"), s1));
-                       }
-               }
-       } else if(msg == MSG_KILL_ACTION_SPREE) {
-               if(gentle)
-                       print (sprintf(_("^1%s^1 needs a restart after a %d scoring spree\n"), s1, stof(s2)));
-               else
-                       print (sprintf(_("^1%s^1 died with a %d kill spree\n"), s1, stof(s2)));
-       } else if(msg == MSG_INFO) {
-               if(type == INFO_GOTFLAG) { // here, s2 is the flag name
-                       HUD_KillNotify_Push(s1, s2, 0, INFO_GOTFLAG);
-                       print(sprintf(_("%s^7 got the %s\n"), s1, s2));
-               } else if(type == INFO_LOSTFLAG) {
-                       HUD_KillNotify_Push(s1, s2, 0, INFO_LOSTFLAG);
-                       print(sprintf(_("%s^7 lost the %s\n"), s1, s2));
-               } else if(type == INFO_PICKUPFLAG) {
-                       HUD_KillNotify_Push(s1, s2, 0, INFO_GOTFLAG);
-                       print(sprintf(_("%s^7 picked up the %s\n"), s1, s2));
-               } else if(type == INFO_RETURNFLAG) {
-                       HUD_KillNotify_Push(s1, s2, 0, INFO_RETURNFLAG);
-                       print(sprintf(_("%s^7 returned the %s\n"), s1, s2));
-               } else if(type == INFO_CAPTUREFLAG) {
-                       HUD_KillNotify_Push(s1, s2, 0, INFO_CAPTUREFLAG);
-                       print(sprintf(_("%s^7 captured the %s%s\n"), s1, s2, s3));
-               }
-       } else if(msg == MSG_RACE) {
-               if(type == RACE_SERVER_RECORD) {
-                       HUD_KillNotify_Push(s1, s2, 1, RACE_SERVER_RECORD);
-               }
-               else if(type == RACE_NEW_RANK) {
-                       HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_RANK);
-               }
-               else if(type == RACE_NEW_TIME) {
-                       HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_TIME);
-               }
-               else if(type == RACE_FAIL) {
-                       HUD_KillNotify_Push(s1, s2, 1, RACE_FAIL);
-               }
-       } else if(msg == MSG_KA) {
-               if(type == KA_PICKUPBALL) {
-                       HUD_KillNotify_Push(s1, s2, 0, KA_PICKUPBALL);
-                       if(alsoprint)
-                               print (sprintf(_("%s^7 has picked up the ball!\n"), s1));
-               }
-               else if(type == KA_DROPBALL) {
-                       HUD_KillNotify_Push(s1, s2, 0, KA_DROPBALL);
-                       if(alsoprint)
-                               print(sprintf(_("%s^7 has dropped the ball!\n"), s1));
-               }
-       }
-}
+               // attacker
+               if(notify_attackers[kn_index]) { strunzone(notify_attackers[kn_index]); }
+               notify_attackers[kn_index] = strzone(attacker);
 
-void HUD_KillCenterprint(string s1, string s2, float type, float msg)
-{
-       float gentle;
-       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
-       if(msg == MSG_SUICIDE) {
-               if (type == DEATH_TEAMCHANGE) {
-                       centerprint_hud(sprintf(_("You are now on: %s"), s1));
-               } else if (type == DEATH_AUTOTEAMCHANGE) {
-                       centerprint_hud(sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1));
-               } else if (type == DEATH_CAMP) {
-                       if(gentle)
-                               centerprint_hud(_("^1Reconsider your tactics, camper!"));
-                       else
-                               centerprint_hud(_("^1Die camper!"));
-               } else if (type == DEATH_NOAMMO) {
-                       if(gentle)
-                               centerprint_hud(_("^1You are reinserted into the game for running out of ammo..."));
-                       else
-                               centerprint_hud(_("^1You were killed for running out of ammo..."));
-               } else if (type == DEATH_ROT) {
-                       if(gentle)
-                               centerprint_hud(_("^1You need to preserve your health"));
-                       else
-                               centerprint_hud(_("^1You grew too old without taking your medicine"));
-               } else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
-                       if(gentle)
-                               centerprint_hud(_("^1Don't go against team mates!"));
-                       else
-                               centerprint_hud(_("^1Don't shoot your team mates!"));
-               } else if (type == DEATH_QUIET) {
-                       // do nothing
-               } else { // generic message
-                       if(gentle)
-                               centerprint_hud(_("^1You need to be more careful!"));
-                       else
-                               centerprint_hud(_("^1You killed your own dumb self!"));
-               }
-       } else if(msg == MSG_KILL) {
-               if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
-                       if(gentle) {
-                               centerprint_hud(sprintf(_("^1Moron! You went against ^7%s^1, a team mate!"), s1));
-                       } else {
-                               centerprint_hud(sprintf(_("^1Moron! You fragged ^7%s^1, a team mate!"), s1));
-                       }
-               } else if (type == KILL_FIRST_BLOOD) {
-                       if(gentle) {
-                               centerprint_hud(_("^1First score"));
-                       } else {
-                               centerprint_hud(_("^1First blood"));
-                       }
-               } else if (type == KILL_FIRST_VICTIM) {
-                       if(gentle) {
-                               centerprint_hud(_("^1First casualty"));
-                       } else {
-                               centerprint_hud(_("^1First victim"));
-                       }
-               } else if (type == KILL_TYPEFRAG) { // s2 contains "advanced kill messages" such as ping, handicap...
-                       if(gentle) {
-                               centerprint_hud(strcat(sprintf(_("^1You scored against ^7%s^1 who was typing!"), s1), s2));
-                       } else {
-                               centerprint_hud(strcat(sprintf(_("^1You typefragged ^7%s"), s1), s2));
-                       }
-               } else if (type == KILL_TYPEFRAGGED) {
-                       if(gentle) {
-                               centerprint_hud(strcat(sprintf(_("^1You were scored against by ^7%s^1 while you were typing!"), s1), s2));
-                       } else {
-                               centerprint_hud(strcat(sprintf(_("^1You were typefragged by ^7%s"), s1), s2));
-                       }
-               } else if (type == KILL_FRAG) {
-                       if(gentle) {
-                               centerprint_hud(strcat(sprintf(_("^4You scored against ^7%s"), s1), s2));
-                       } else {
-                               centerprint_hud(strcat(sprintf(_("^4You fragged ^7%s"), s1), s2));
-                       }
-               } else { // generic message
-                       if(gentle) {
-                               centerprint_hud(strcat(sprintf(_("^1You were scored against by ^7%s"), s1), s2));
-                       } else {
-                               centerprint_hud(strcat(sprintf(_("^1You were fragged by ^7%s"), s1), s2));
-                       }
-               }
-       } else if(msg == MSG_KILL_ACTION) {
-               // TODO: invent more centerprints here?
-               centerprint_hud(_("^1Watch your step!"));
+               // victim
+               if(notify_victims[kn_index]) { strunzone(notify_victims[kn_index]); }
+               notify_victims[kn_index] = strzone(victim);
        }
 }
 
-void HUD_Notify (void)
+void HUD_Notify(void)
 {
        if(!autocvar__hud_configure)
        {
@@ -2201,14 +1701,11 @@ void HUD_Notify (void)
        float fadetime;
        fadetime = autocvar_hud_panel_notify_fadetime;
 
-       string s;
-
-       vector pos_attacker, pos_victim;
-       vector weap_pos;
+       vector pos_attacker, pos_victim, pos_icon;
        float width_attacker;
-       string attacker, victim;
+       string attacker, victim, icon;
 
-       float i, j, w, type, step, limit;
+       float i, j, step, limit;
        if(autocvar_hud_panel_notify_flip) //order items from the top down
        {
                i = 0;
@@ -2232,230 +1729,62 @@ void HUD_Notify (void)
                                a = entries - 1 - i;
                        attacker = textShortenToWidth(sprintf(_("Player %d"), a+1), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
                        victim = textShortenToWidth(sprintf(_("Player %d"), a+2), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       s = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname);
+                       icon = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname);
                        a = bound(0, (when - a) / 4, 1);
                        goto hud_config_notifyprint;
                }
-
-               if (j == KN_MAX_ENTRIES)
-                       j = 0;
-
-               if(killnotify_times[j] + when > time)
-                       a = 1;
-               else if(fadetime)
-               {
-                       a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
-                       if(!a)
-                       {
-                               break;
-                       }
-               }
                else
                {
-                       break;
-               }
-
-               s = "";
+                       if (j == KN_MAX_ENTRIES)
+                               j = 0;
 
-               type = killnotify_deathtype[j];
-               w = DEATH_WEAPONOF(type);
-
-               // TODO: maybe print in team colors?
-               //
-               // Y [used by] X
-               if(killnotify_actiontype[j] == 0) 
-               {
-                       if(type == DEATH_GENERIC)
-                       {
-                               s = "notify_death";
-                       }
-                       else if(type == DEATH_NOAMMO)
-                       {
-                               s = "notify_outofammo";
-                       }
-                       else if(type == DEATH_KILL)
-                       {
-                               s = "notify_selfkill";
-                       }
-                       else if(type == DEATH_CAMP)
-                       {
-                               s = "notify_camping";
-                       }
-                       else if(type == KILL_TEAM_RED)
-                       {
-                               s = "notify_teamkill_red";
-                       }
-                       else if(type == KILL_TEAM_BLUE)
-                       {
-                               s = "notify_teamkill_blue";
-                       }
-                       else if(type == DEATH_DROWN)
-                       {
-                               s = "notify_water";
-                       }
-                       else if(type == DEATH_SLIME)
-                       {
-                               s = "notify_slime";
-                       }
-                       else if(type == DEATH_LAVA)
-                       {
-                               s = "notify_lava";
-                       }
-                       else if(type == DEATH_FALL)
-                       {
-                               s = "notify_fall";
-                       }
-                       else if(type == DEATH_SHOOTING_STAR)
-                       {
-                               s = "notify_shootingstar";
-                       }
-                       else if(type == DEATH_HURTTRIGGER || type == DEATH_CUSTOM)
-                       {
-                               s = "notify_death";
-                       }
-                       else if(type == INFO_GOTFLAG)
-                       {
-                               if(killnotify_victims[j] == "^1RED^7 flag")
-                               {
-                                       s = "notify_red_taken";
-                               }
-                               else
-                               {
-                                       s = "notify_blue_taken";
-                               }
-                       }
-                       else if(type == INFO_RETURNFLAG)
-                       {
-                               if(killnotify_victims[j] == "^1RED^7 flag")
-                               {
-                                       s = "notify_red_returned";
-                               }
-                               else
-                               {
-                                       s = "notify_blue_returned";
-                               }
-                       }
-                       else if(type == INFO_LOSTFLAG)
-                       {
-                               if(killnotify_victims[j] == "^1RED^7 flag")
-                               {
-                                       s = "notify_red_lost";
-                               }
-                               else
-                               {
-                                       s = "notify_blue_lost";
-                               }
-                       }
-                       else if(type == INFO_CAPTUREFLAG)
+                       if(notify_times[j] + when > time)
+                               a = 1;
+                       else if(fadetime)
                        {
-                               if(killnotify_victims[j] == "^1RED^7 flag")
+                               a = bound(0, (notify_times[j] + when + fadetime - time) / fadetime, 1);
+                               if(!a)
                                {
-                                       s = "notify_red_captured";
-                               }
-                               else
-                               {
-                                       s = "notify_blue_captured";
+                                       break;
                                }
                        }
-                       else if(type == KA_DROPBALL)
-                       {
-                               s = "notify_balldropped";
-                       }
-                       else if(type == KA_PICKUPBALL)
+                       else
                        {
-                               s = "notify_ballpickedup";
+                               break;
                        }
                        
-                       attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
-                       if(s != "")
-                       {
-                               drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                       }
+                       attacker = notify_attackers[j];
+                       victim = notify_victims[j];
+                       icon = notify_icon[j];
                }
-               // X [did action to] Y
-               else
+
+               //type = notify_deathtype[j];
+               //w = DEATH_WEAPONOF(type);
+
+               if(icon != "")
                {
-                       if(type & HITTYPE_SECONDARY && w == WEP_LASER)
-                       {
-                               s = "notify_melee_laser";
-                       }
-                       else if(type & HITTYPE_SECONDARY && w == WEP_SHOTGUN)
-                       {
-                               s = "notify_melee_shotgun";
-                       }
-                       else if(WEP_VALID(w))
-                       {
-                               self = get_weaponinfo(w);
-                               s = strcat("weapon", self.netname);
-                       }
-                       else if(type == KILL_TEAM_RED)
-                       {
-                               s = "notify_teamkill_red";
-                       }
-                       else if(type == KILL_TEAM_BLUE)
+                       if((attacker != "") && (victim == ""))
                        {
-                               s = "notify_teamkill_red";
-                       }
-                       else if(type == DEATH_TELEFRAG)
-                       {
-                               s = "notify_telefrag";
-                       }
-                       else if(type == DEATH_DROWN)
-                       {
-                               s = "notify_water";
-                       }
-                       else if(type == DEATH_SLIME)
-                       {
-                               s = "notify_slime";
-                       }
-                       else if(type == DEATH_LAVA)
-                       {
-                               s = "notify_lava";
-                       }
-                       else if(type == DEATH_FALL)
-                       {
-                               s = "notify_fall";
-                       }
-                       else if(type == DEATH_SHOOTING_STAR)
-                       {
-                               s = "notify_shootingstar";
-                       }
-                       else if(type == DEATH_HURTTRIGGER || type == DEATH_CUSTOM) // DEATH_CUSTOM is also void, right?
-                       {
-                               s = "notify_void";
-                       }
-                       else if(type == RACE_SERVER_RECORD)
-                       {
-                               s = "race_newrecordserver";
-                       }
-                       else if(type == RACE_NEW_RANK)
-                       {
-                               s = "race_newrankyellow";
-                       }
-                       else if(type == RACE_NEW_TIME)
-                       {
-                               s = "race_newtime";
+                               // Y [used by] X
+                               attacker = textShortenToWidth(attacker, 0.73 * mySize_x - height, fontsize, stringwidth_colors);
+                               pos_attacker = pos + eX * (0.27 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+                               pos_icon = pos + eX * 0.25 * mySize_x - eX * height + eY * i * height;
+
+                               drawpic_aspect_skin(pos_icon, icon, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
-                       else if(type == RACE_FAIL)
+                       else if((attacker != "") && (victim != ""))
                        {
-                               s = "race_newfail";
-                       }
-
-                       attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                               // X [did action to] Y
+                               attacker = textShortenToWidth(attacker, 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                               victim = textShortenToWidth(victim, 0.48 * mySize_x - height, fontsize, stringwidth_colors);
 :hud_config_notifyprint
-                       width_attacker = stringwidth(attacker, TRUE, fontsize);
-                       pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                       pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+                               width_attacker = stringwidth(attacker, TRUE, fontsize);
+                               pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+                               pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
+                               pos_icon = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
 
-                       if(s != "")
-                       {
-                               drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               drawpic_aspect_skin(pos_icon, icon, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                                drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                                drawcolorcodedstring(pos_victim, victim, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
@@ -2706,8 +2035,8 @@ void HUD_Radar(void)
        for(tm = world; (tm = find(tm, classname, "entcs_receiver")); )
        {
                color2 = GetPlayerColor(tm.sv_entnum);
-               //if(color == COLOR_SPECTATOR || color == color2)
-                       draw_teamradar_player(tm.origin, tm.angles, GetTeamRGB(color2));
+               //if(color == FL_SPECTATOR || color == color2)
+                       draw_teamradar_player(tm.origin, tm.angles, Team_ColorRGB(color2));
        }
        draw_teamradar_player(view_origin, view_angles, '1 1 1');
 
@@ -2746,7 +2075,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                        for(i=0; i<team_count; ++i) {
                                if (i == floor((entries - 2) / players_per_team) || (entries == 1 && i == 0))
                                        HUD_Panel_DrawHighlight(pos + eX * score_size * i, eX * score_size + eY * fontsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), eX * score_size + eY * fontsize_y, GetTeamRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), eX * score_size + eY * fontsize_y, Team_ColorRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        first_pl = 1;
                        pos_y += fontsize_y;
@@ -2771,7 +2100,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                        }
 
                        if (team_count)
-                               score_color = GetTeamRGB(ColorByTeam(floor((i - first_pl) / players_per_team))) * 0.8;
+                               score_color = Team_ColorRGB(ColorByTeam(floor((i - first_pl) / players_per_team))) * 0.8;
                        s = textShortenToWidth(s, name_size, fontsize, stringwidth_colors);
                        drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                        drawstring(pos + eX * (name_size + spacing_size), ftos(score), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2787,11 +2116,11 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                // show team scores in the first line
                float score_size = mySize_x / team_count;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
-                       if(tm.team == COLOR_SPECTATOR)
+                       if(tm.team == FL_SPECTATOR)
                                continue;
                        if (tm.team == myteam)
                                drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize_y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores[ts_primary])), eX * score_size + eY * fontsize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores[ts_primary])), eX * score_size + eY * fontsize_y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        ++i;
                }
                first_pl = 1;
@@ -2803,14 +2132,14 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
        do
        for (pl = players.sort_next; pl && i<entries; pl = pl.sort_next)
        {
-               if ((team_count && pl.team != tm.team) || pl.team == COLOR_SPECTATOR)
+               if ((team_count && pl.team != tm.team) || pl.team == FL_SPECTATOR)
                        continue;
 
                if (i == entries-1 && !me_printed && pl != me)
                if (autocvar_hud_panel_score_rankings == 1 && spectatee_status != -1)
                {
                        for (pl = me.sort_next; pl; pl = pl.sort_next)
-                               if (pl.team != COLOR_SPECTATOR)
+                               if (pl.team != FL_SPECTATOR)
                                        break;
 
                        if (pl)
@@ -2828,14 +2157,14 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                        drawfill(pos, eX * mySize_x + eY * fontsize_y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                if (team_count)
-                       score_color = GetTeamRGB(pl.team) * 0.8;
+                       score_color = Team_ColorRGB(pl.team) * 0.8;
                s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors);
                drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                pos_y += fontsize_y;
                ++i;
        }
-       while (i<entries && team_count && (tm = tm.sort_next) && (tm.team != COLOR_SPECTATOR || (tm = tm.sort_next)));
+       while (i<entries && team_count && (tm = tm.sort_next) && (tm.team != FL_SPECTATOR || (tm = tm.sort_next)));
 }
 
 void HUD_Score(void)
@@ -2956,7 +2285,7 @@ void HUD_Score(void)
                vector score_pos, score_size; //for scores other than myteam
                if (spectatee_status == -1 || autocvar_hud_panel_score_rankings)
                {
-                       for(tm = teams.sort_next; tm, tm.team != COLOR_SPECTATOR; tm = tm.sort_next)
+                       for(tm = teams.sort_next; tm, tm.team != FL_SPECTATOR; tm = tm.sort_next)
                                ++scores_count;
                        if (autocvar_hud_panel_score_rankings)
                        {
@@ -2995,7 +2324,7 @@ void HUD_Score(void)
                draw_beginBoldFont();
                row = column = 0;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
-                       if(tm.team == COLOR_SPECTATOR)
+                       if(tm.team == FL_SPECTATOR)
                                continue;
                        score = tm.(teamscores[ts_primary]);
                        if(autocvar__hud_configure)
@@ -3009,7 +2338,7 @@ void HUD_Score(void)
                                score_pos = pos + eX * column * (score_size_x + offset_x) + eY * row * (score_size_y + offset_y);
                                if (max_fragcount == score)
                                        HUD_Panel_DrawHighlight(score_pos, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(score_pos, ftos(score), score_size, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(score_pos, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                                ++row;
                                if(row >= rows)
                                {
@@ -3020,11 +2349,11 @@ void HUD_Score(void)
                        else if(tm.team == myteam) {
                                if (max_fragcount == score)
                                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        } else {
                                if (max_fragcount == score)
                                        HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize_x + eY * (1/3) * rows * mySize_y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * 0.75 * mySize_x + eY * (1/3) * rows * mySize_y, ftos(score), score_size, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + eX * 0.75 * mySize_x + eY * (1/3) * rows * mySize_y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                                ++rows;
                        }
                }
@@ -3438,7 +2767,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                case 2: red_icon = "flag_red_lost"; break;
                case 3: red_icon = "flag_red_carrying"; red_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
                default:
-                       if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM2))
+                       if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_2))
                                red_icon = "flag_red_shielded";
                        else
                                red_icon = string_null;
@@ -3451,7 +2780,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                default:
                        if(redflag == 3)
                                red_icon_prevstatus = "flag_red_carrying"; // make it more visible
-                       else if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM2))
+                       else if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_2))
                                red_icon_prevstatus = "flag_red_shielded";
                        else
                                red_icon_prevstatus = string_null;
@@ -3466,7 +2795,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                case 2: blue_icon = "flag_blue_lost"; break;
                case 3: blue_icon = "flag_blue_carrying"; blue_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;
                default:
-                       if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM1))
+                       if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_1))
                                blue_icon = "flag_blue_shielded";
                        else
                                blue_icon = string_null;
@@ -3479,7 +2808,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                default:
                        if(blueflag == 3)
                                blue_icon_prevstatus = "flag_blue_carrying"; // make it more visible
-                       else if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM1))
+                       else if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_1))
                                blue_icon_prevstatus = "flag_blue_shielded";
                        else
                                blue_icon_prevstatus = string_null;
@@ -3487,7 +2816,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        }
 
        if(mySize_x > mySize_y) {
-               if (myteam == COLOR_TEAM1) { // always draw own flag on left
+               if (myteam == FL_TEAM_1) { // always draw own flag on left
                        redflag_pos = pos;
                        blueflag_pos = pos + eX * 0.5 * mySize_x;
                } else {
@@ -3496,7 +2825,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
                }
                flag_size = eX * 0.5 * mySize_x + eY * mySize_y;
        } else {
-               if (myteam == COLOR_TEAM1) { // always draw own flag on left
+               if (myteam == FL_TEAM_1) { // always draw own flag on left
                        redflag_pos = pos;
                        blueflag_pos = pos + eY * 0.5 * mySize_y;
                } else {
@@ -3610,16 +2939,16 @@ void HUD_Mod_KH(vector pos, vector mySize)
                {
                        switch(keyteam)
                        {
-                               case COLOR_TEAM1:
+                               case FL_TEAM_1:
                                        drawpic_aspect_skin(pa, "kh_redarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL);  // show 30% theAlpha key
                                        break;
-                               case COLOR_TEAM2:
+                               case FL_TEAM_2:
                                        drawpic_aspect_skin(pa, "kh_bluearrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL);  // show 30% theAlpha key
                                        break;
-                               case COLOR_TEAM3:
+                               case FL_TEAM_3:
                                        drawpic_aspect_skin(pa, "kh_yellowarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL);  // show 30% theAlpha key
                                        break;
-                               case COLOR_TEAM4:
+                               case FL_TEAM_4:
                                        drawpic_aspect_skin(pa, "kh_pinkarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL);  // show 30% theAlpha key
                                        break;
                                default:
@@ -3853,7 +3182,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
        else
                rank = 0;
        string rankname;
-       rankname = race_PlaceName(rank);
+       rankname = count_ordinal(rank);
 
        vector namepos;
        namepos = medalPos + '0 0.8 0' * squareSize;
@@ -3966,7 +3295,7 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        entity tm;
        float teams_count = 0;
        for(tm = teams.sort_next; tm; tm = tm.sort_next)
-               if(tm.team != COLOR_SPECTATOR)
+               if(tm.team != FL_SPECTATOR)
                        ++teams_count;
 
        float layout = autocvar_hud_panel_modicons_dom_layout;
@@ -4425,7 +3754,7 @@ void HUD_InfoMessages(void)
                        {
                                for(; tm.sort_next; tm = tm.sort_next)
                                {
-                                       if(!tm.team_size || tm.team == COLOR_SPECTATOR)
+                                       if(!tm.team_size || tm.team == FL_SPECTATOR)
                                                continue;
                                        if(!ts_min) ts_min = tm.team_size;
                                        else ts_min = min(ts_min, tm.team_size);
@@ -4437,7 +3766,7 @@ void HUD_InfoMessages(void)
                                        s = strcat(blinkcolor, _("Teamnumbers are unbalanced!"));
                                        tm = GetTeam(myteam, false);
                                        if (tm)
-                                       if (tm.team != COLOR_SPECTATOR)
+                                       if (tm.team != FL_SPECTATOR)
                                        if (tm.team_size == ts_max)
                                                s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
                                        drawInfoMessage(s)
@@ -4960,7 +4289,7 @@ void HUD_CenterPrint (void)
                drawfontscale = sz * '1 1 0';
                
                if (centerprint_countdown_num[j])
-                       n = tokenizebyseparator(sprintf(centerprint_messages[j], centerprint_countdown_num[j]), "\n");
+                       n = tokenizebyseparator(strreplace("^COUNT", count_seconds(centerprint_countdown_num[j]), centerprint_messages[j]), "\n");
                else
                        n = tokenizebyseparator(centerprint_messages[j], "\n");
 
index 0da6ac5d087e5875bc3cc9efa5a66336593b35f6..90ece36ac0d77117d47fe83970f40c36585bebdd 100644 (file)
@@ -340,3 +340,12 @@ switch(id) { \
        case HUD_PANEL_ENGINEINFO: HUD_Panel_UpdatePosSize(engineinfo) break;\
        default: HUD_Panel_UpdatePosSizeForId_Part2(id)\
 }
+
+#define KN_MAX_ENTRIES 10
+
+float kn_index;
+float notify_times[KN_MAX_ENTRIES];
+string notify_icon[KN_MAX_ENTRIES];
+string notify_attackers[KN_MAX_ENTRIES];
+string notify_victims[KN_MAX_ENTRIES];
+void HUD_Notify_Push(string icon, string attacker, string victim);
index 28536c256b017f5f7a0397e86728c90fe0d4682f..8369a5ff20bc9ce399d0eef7c1a35d1063b4d8a9 100644 (file)
@@ -38,16 +38,6 @@ float gametype;
 //.float ctf_state;
 //.float health;
 
-// Constants
-const float COLOR_TEAM_RED = 64;
-const float COLOR_TEAM_BLUE = 208;
-
-const float COLOR_TEAM1       = 4;  // red
-const float COLOR_TEAM2       = 13; // blue
-const float COLOR_TEAM3       = 12; // yellow
-const float COLOR_TEAM4       = 9; // pink
-const float COLOR_SPECTATOR = 1337;
-
 #define FONT_DEFAULT 0
 #define FONT_USER 8
 
index 7edabdfc524bbcc5fecc5636d936e5bac72f0343..8bee032385d1c222a737f3d467cf40c01b9aa12d 100644 (file)
@@ -108,7 +108,7 @@ entity GetTeam(float Team, float add)
 {
        float num;
        entity tm;
-       num = (Team == COLOR_SPECTATOR) ? 16 : Team;
+       num = (Team == FL_SPECTATOR) ? 16 : Team;
        if(teamslots[num])
                return teamslots[num];
        if not(add)
@@ -164,20 +164,6 @@ string ColorTranslateRGB(string s)
                return s;
 }
 
-string Team_ColorCode(float teamid)
-{
-    if (teamid == COLOR_TEAM1)
-        return "^1";
-    else if (teamid == COLOR_TEAM2)
-        return "^4";
-    else if (teamid == COLOR_TEAM3)
-        return "^3";
-    else if (teamid == COLOR_TEAM4)
-        return "^6";
-    else
-        return "^7";
-}
-
 // decolorizes and team colors the player name when needed
 string playername(string thename, float teamid)
 {
index 9d968f1fe7d86e1ceeecf09b135c6dcc1e23d4f7..335a17e5467d9f88780d14f3486c6894c91c92ef 100644 (file)
@@ -14,8 +14,10 @@ Defs.qc
 ../warpzonelib/common.qh
 ../warpzonelib/client.qh
 
+../common/teams.qh
 ../common/util.qh
 ../common/items.qh
+../common/deathtypes.qh
 ../common/explosion_equation.qh
 ../common/mapinfo.qh
 ../common/command/markup.qh
@@ -28,6 +30,8 @@ command/cl_cmd.qh
 
 autocvars.qh
 
+../common/notifications.qh // must be after autocvars
+
 damage.qh
 
 ../csqcmodellib/interpolate.qh
@@ -39,7 +43,6 @@ movetypes.qh
 prandom.qh
 bgmscript.qh
 noise.qh
-teamplay.qh
 tturrets.qh
 ../server/tturrets/include/turrets_early.qh
 ../server/movelib.qc
@@ -54,7 +57,6 @@ player_skeleton.qh
 
 sortlist.qc
 miscfunctions.qc
-teamplay.qc
 ../server/t_items.qc
 
 teamradar.qc
@@ -97,6 +99,7 @@ bgmscript.qc
 noise.qc
 
 ../common/util.qc
+../common/notifications.qc
 ../common/command/markup.qc
 ../common/command/rpn.qc
 ../common/command/generic.qc
index 1aa1b6a435ac5d015e5c27f0d4cd24cbbfdc61bf..8fea73f8f9f652104cb72f51bf45b835bb0f7016 100644 (file)
@@ -152,16 +152,16 @@ float HUD_ComparePlayerScores(entity left, entity right)
        vr = GetPlayerColor(right.sv_entnum);
 
        if(!left.gotscores)
-               vl = COLOR_SPECTATOR;
+               vl = FL_SPECTATOR;
        if(!right.gotscores)
-               vr = COLOR_SPECTATOR;
+               vr = FL_SPECTATOR;
 
        if(vl > vr)
                return true;
        if(vl < vr)
                return false;
 
-       if(vl == COLOR_SPECTATOR)
+       if(vl == FL_SPECTATOR)
        {
                // FIRST the one with scores (spectators), THEN the ones without (downloaders)
                // no other sorting
@@ -207,9 +207,9 @@ float HUD_CompareTeamScores(entity left, entity right)
 {
        float i, r;
 
-       if(left.team == COLOR_SPECTATOR)
+       if(left.team == FL_SPECTATOR)
                return 1;
-       if(right.team == COLOR_SPECTATOR)
+       if(right.team == FL_SPECTATOR)
                return 0;
 
        r = HUD_CompareScore(left.teamscores[ts_primary], right.teamscores[ts_primary], teamscores_flags[ts_primary]);
@@ -669,11 +669,11 @@ string HUD_FixScoreboardColumnWidth(float i, string str)
 void HUD_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_number)
 {
        vector tmp, rgb;
-       rgb = GetTeamRGB(pl.team);
+       rgb = Team_ColorRGB(pl.team);
        string str;
        float i, field;
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
+       is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
 
        if((rgb == '1 1 1') && (!is_spec)) {
                rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
@@ -917,7 +917,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        else
                for(pl = players.sort_next; pl; pl = pl.sort_next)
                {
-                       if(pl.team == COLOR_SPECTATOR)
+                       if(pl.team == FL_SPECTATOR)
                                continue;
                        HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), i);
                        pos_y += 1.25 * hud_fontsize_y;
@@ -1120,7 +1120,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                return pos;
 
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
+       is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
        vector hl_rgb;
        hl_rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
        hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
@@ -1148,7 +1148,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                if (t == 0)
                        continue;
                n = grecordholder[i];
-               p = race_PlaceName(i+1);
+               p = count_ordinal(i+1);
                if(grecordholder[i] == GetPlayerName(player_localnum))
                        drawfill(pos, '1 0 0' * sbwidth + '0 1.25 0' * hud_fontsize_y, hl_rgb, scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
                else if(!mod(i, 2) && scoreboard_highlight)
@@ -1237,11 +1237,11 @@ void HUD_DrawScoreboard()
                team_score_baseoffset = eY * (2 * autocvar_scoreboard_border_thickness + hud_fontsize_y) - eX * (autocvar_scoreboard_border_thickness + hud_fontsize_x * 0.25);
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
-                       if(tm.team == COLOR_SPECTATOR)
+                       if(tm.team == FL_SPECTATOR)
                                continue;
 
                        draw_beginBoldFont();
-                       rgb = GetTeamRGB(tm.team);
+                       rgb = Team_ColorRGB(tm.team);
                        str = ftos(tm.(teamscores[ts_primary]));
                        drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
 
@@ -1273,7 +1273,7 @@ void HUD_DrawScoreboard()
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
-                       if(tm.team == COLOR_SPECTATOR)
+                       if(tm.team == FL_SPECTATOR)
                                continue;
 
                        pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
@@ -1293,14 +1293,14 @@ void HUD_DrawScoreboard()
        }
        else if(autocvar_scoreboard_accuracy && spectatee_status != -1 && !warmup_stage) {
                if(teamplay)
-                       pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
+                       pos = HUD_DrawScoreboardAccuracyStats(pos, Team_ColorRGB(myteam), bg_size);
                else
                        pos = HUD_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
        }
 
                
        if(teamplay)
-               pos = HUD_DrawMapStats(pos, GetTeamRGB(myteam), bg_size);
+               pos = HUD_DrawMapStats(pos, Team_ColorRGB(myteam), bg_size);
        else
                pos = HUD_DrawMapStats(pos, rgb, bg_size);
 
@@ -1310,7 +1310,7 @@ void HUD_DrawScoreboard()
        tmp = pos;
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
-               if(pl.team != COLOR_SPECTATOR)
+               if(pl.team != FL_SPECTATOR)
                        continue;
                pos_y += 1.25 * hud_fontsize_y;
                HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), specs);
index 8b4f7a09f6996bbc22c5dcad8e9403e80908fe2e..3bc231c254ffa4991b6d59acd73286880a952aeb 100644 (file)
@@ -187,7 +187,7 @@ void Draw_ShowNames_All()
        {
                float t;
                t = GetPlayerColor(i);
-               if(t == COLOR_SPECTATOR)
+               if(t == FL_SPECTATOR)
                        continue;
 
                entity e;
diff --git a/qcsrc/client/teamplay.qc b/qcsrc/client/teamplay.qc
deleted file mode 100644 (file)
index 80d8931..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-float TeamByColor(float color)
-{
-       switch(color)
-       {
-       case COLOR_TEAM1: return 0;
-       case COLOR_TEAM2: return 1;
-       case COLOR_TEAM3: return 2;
-       case COLOR_TEAM4: return 3;
-       default: return 0;
-       }
-}
-float ColorByTeam(float i)
-{
-       switch(i)
-       {
-       case 0: return COLOR_TEAM1;
-       case 1: return COLOR_TEAM2;
-       case 2: return COLOR_TEAM3;
-       case 3: return COLOR_TEAM4;
-       default: return COLOR_TEAM1;
-       }
-}
-
-float GetPlayerColorForce(float i)
-{
-       if(!teamplay)
-               return 0;
-       else
-               return stof(getplayerkeyvalue(i, "colors")) & 15;
-}
-
-float GetPlayerColor(float i)
-{
-       if not(playerslots[i].gotscores) // unconnected
-               return COLOR_SPECTATOR;
-       else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
-               return COLOR_SPECTATOR;
-       else
-               return GetPlayerColorForce(i);
-}
-
-string GetPlayerName(float i)
-{
-       return ColorTranslateRGB(getplayerkeyvalue(i, "name"));
-}
-
-vector GetTeamRGB(float color)
-{
-       switch(color)
-       {
-       default: return '1 1 1';
-       case COLOR_TEAM1: return '1 0 0'; // red
-       case COLOR_TEAM2: return '0 0 1'; // blue
-       case COLOR_TEAM3: return '1 1 0'; // yellow
-       case COLOR_TEAM4: return '1 0 1'; // pink
-       }
-}
-
-string GetTeamName(float color)
-{
-       switch(color)
-       {
-       default: return _("Spectators");
-       case COLOR_TEAM1: return _("Red Team");
-       case COLOR_TEAM2: return _("Blue Team");
-       case COLOR_TEAM3: return _("Yellow Team");
-       case COLOR_TEAM4: return _("Pink Team");
-       }
-}
diff --git a/qcsrc/client/teamplay.qh b/qcsrc/client/teamplay.qh
deleted file mode 100644 (file)
index 8335990..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-float teamplay;
-float myteam;
index 6f3b030502196171db72a24520b89fb7a9713979..6ac004c7b9e003b7cf445d22f15d4cbd3dcf2747 100644 (file)
@@ -163,22 +163,22 @@ void turret_changeteam()
 {      
        switch(self.team - 1)
        {
-        case COLOR_TEAM1: // Red
+        case FL_TEAM_1: // Red
             self.glowmod = '2 0 0';
             self.teamradar_color = '1 0 0';
             break;
 
-        case COLOR_TEAM2: // Blue
+        case FL_TEAM_2: // Blue
             self.glowmod = '0 0 2';
             self.teamradar_color = '0 0 1';
             break;
 
-        case COLOR_TEAM3: // Yellow
+        case FL_TEAM_3: // Yellow
             self.glowmod = '1 1 0';
             self.teamradar_color = '1 1 0';
             break;
 
-        case COLOR_TEAM4: // Pink
+        case FL_TEAM_4: // Pink
             self.glowmod = '1 0 1';
             self.teamradar_color = '1 0 1';
             break;
index 7e9b91d6b81d65daa657a544410ce25fb87e97f9..9ac90e3c35de2124ed394700372e28d224e2594c 100644 (file)
@@ -423,7 +423,7 @@ void Draw_WaypointSprite()
                                spriteimage = self.netname;
                        break;
                case SPRITERULE_TEAMPLAY:
-                       if(t == COLOR_SPECTATOR + 1)
+                       if(t == FL_SPECTATOR + 1)
                                spriteimage = self.netname3;
                        else if(self.team == t)
                                spriteimage = self.netname2;
index fe176e3167da3d8dd916f4cd17afea04db7958de..4d3df8e87d66b419eac4325858c45041bcccfa39 100644 (file)
@@ -93,7 +93,7 @@ void GenericCommand_addtolist(float request, float argc)
        }
 }
 
-void GenericCommand_curl(float request, float argc)
+void GenericCommand_qc_curl(float request, float argc)
 {
        switch(request)
        {
@@ -166,7 +166,7 @@ void GenericCommand_curl(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " curl [--key N] [--cvar] [--exec] URL [postargs...]"));
+                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
                        return;
                }
        }
@@ -227,6 +227,56 @@ void GenericCommand_dumpcommands(float request)
        }
 }
 
+void GenericCommand_dumpnotifs(float request)
+{
+       switch(request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       #ifndef MENUQC
+                       float fh, alsoprint = FALSE;
+                       string filename = argv(1);
+                       
+                       if(filename == "")
+                       {
+                               filename = "notifications.cfg";
+                               alsoprint = FALSE;
+                       }
+                       else if(filename == "-")
+                       {
+                               filename = "notifications.cfg";
+                               alsoprint = TRUE;
+                       }
+                       fh = fopen(filename, FILE_WRITE);
+                       
+                       if(fh >= 0)
+                       {
+                               Dump_Notifications(fh, alsoprint);
+                               print(sprintf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename));
+                               fclose(fh);
+                       }
+                       else
+                       {
+                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                       }
+                       #else
+                       print(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
+                       #endif
+                       return;
+               }
+                       
+               default:
+               case CMD_REQUEST_USAGE:
+               {
+                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
+                       print("  Where 'filename' is the file to write (default is notifications.cfg),\n");
+                       print("  if supplied with '-' output to console as well as default,\n");
+                       print("  if left blank, it will only write to default.\n");
+                       return;
+               }
+       }
+}
+
 void GenericCommand_maplist(float request, float argc)
 {
        switch(request)
@@ -464,10 +514,11 @@ void GenericCommand_(float request)
 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
 #define GENERIC_COMMANDS(request,arguments,command) \
        GENERIC_COMMAND("addtolist", GenericCommand_addtolist(request, arguments), "Add a string to a cvar") \
-       GENERIC_COMMAND("curl", GenericCommand_curl(request, arguments), "Queries an URL") \
        GENERIC_COMMAND("dumpcommands", GenericCommand_dumpcommands(request), "Dump all commands on the program to *_cmd_dump.txt") \
+       GENERIC_COMMAND("dumpnotifs", GenericCommand_dumpnotifs(request), "Dump all notifications into notifications_dump.txt") \
        GENERIC_COMMAND("maplist", GenericCommand_maplist(request, arguments), "Automatic control of maplist") \
        GENERIC_COMMAND("nextframe", GenericCommand_nextframe(request, arguments, command), "Execute the given command next frame of this VM") \
+       GENERIC_COMMAND("qc_curl", GenericCommand_qc_curl(request, arguments), "Queries a URL") \
        GENERIC_COMMAND("removefromlist", GenericCommand_removefromlist(request, arguments), "Remove a string from a cvar") \
        GENERIC_COMMAND("rpn", GenericCommand_rpn(request, arguments, command), "RPN calculator") \
        GENERIC_COMMAND("settemp", GenericCommand_settemp(request, arguments), "Temporarily set a value to a cvar which is restored later") \
index cdc58cb55445fa99d28d899c5d5e3a464fab5f9e..e4d00825af49fb2d4c937759c583ae3a2ab887d1 100644 (file)
@@ -38,15 +38,13 @@ const float TE_CSQC_TEAMNAGGER = 106;
 const float TE_CSQC_PINGPLREPORT = 107;
 const float TE_CSQC_ANNOUNCE = 110;
 const float TE_CSQC_TARGET_MUSIC = 111;
-const float TE_CSQC_KILLNOTIFY = 112;
-const float TE_CSQC_KILLCENTERPRINT = 113;
-const float TE_CSQC_CENTERPRINT_GENERIC = 114;
-const float TE_CSQC_WEAPONCOMPLAIN = 115;
-const float TE_CSQC_NEX_SCOPE = 116;
-const float TE_CSQC_MINELAYER_MAXMINES = 117;
-const float TE_CSQC_HAGAR_MAXROCKETS = 118;
-const float TE_CSQC_VEHICLESETUP = 119;
-const float TE_CSQC_SVNOTICE = 120;
+const float TE_CSQC_CENTERPRINT_GENERIC = 112;
+const float TE_CSQC_WEAPONCOMPLAIN = 113;
+const float TE_CSQC_NEX_SCOPE = 114;
+const float TE_CSQC_MINELAYER_MAXMINES = 115;
+const float TE_CSQC_HAGAR_MAXROCKETS = 116;
+const float TE_CSQC_VEHICLESETUP = 117;
+const float TE_CSQC_SVNOTICE = 118;
 
 const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
 const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@ -99,6 +97,7 @@ const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
 const float ENT_CLIENT_MODEL = 33;
 const float ENT_CLIENT_ITEM = 34;
 const float ENT_CLIENT_BUMBLE_RAYGUN = 35;
+const float ENT_CLIENT_NOTIFICATION = 36;
 
 const float ENT_CLIENT_TURRET = 40;
 const float ENT_CLIENT_AUXILIARYXHAIR = 50;
@@ -364,85 +363,6 @@ float SPECIES_ROBOT_RUSTY  =  4;
 float SPECIES_ROBOT_SHINY  =  5;
 float SPECIES_RESERVED     = 15;
 
-// Deathtypes (weapon deathtypes are the IT_* constants below)
-// NOTE: when adding death types, please add an explanation to Docs/spamlog.txt too.
-float DEATH_SPECIAL_START = 10000;
-float DEATH_FALL = 10000;
-float DEATH_TELEFRAG = 10001;
-float DEATH_DROWN = 10002;
-float DEATH_HURTTRIGGER = 10003;
-float DEATH_LAVA = 10004;
-float DEATH_SLIME = 10005;
-float DEATH_KILL = 10006;
-float DEATH_NOAMMO = 10007;
-float DEATH_SWAMP = 10008;
-float DEATH_TEAMCHANGE = 10009;
-float DEATH_AUTOTEAMCHANGE = 10010;
-float DEATH_CAMP = 10011;
-float DEATH_SHOOTING_STAR = 10012;
-float DEATH_ROT = 10013;
-float DEATH_MIRRORDAMAGE = 10014;
-float DEATH_TOUCHEXPLODE = 10015;
-float DEATH_CHEAT = 10016;
-float DEATH_FIRE = 10017;
-float DEATH_QUIET = 10021;
-
-float  DEATH_VHFIRST       = 10030;
-float  DEATH_VHCRUSH       = 10030;
-float  DEATH_SBMINIGUN     = 10031;
-float  DEATH_SBROCKET      = 10032;
-float  DEATH_SBBLOWUP      = 10033;
-float  DEATH_WAKIGUN       = 10034;
-float  DEATH_WAKIROCKET    = 10035;
-float  DEATH_WAKIBLOWUP    = 10036;
-float  DEATH_RAPTOR_CANNON = 10037;
-float  DEATH_RAPTOR_BOMB   = 10038;
-float  DEATH_RAPTOR_BOMB_SPLIT = 10039;
-float  DEATH_RAPTOR_DEATH   = 10040;
-float  DEATH_BUMB_GUN       = 10041;
-float  DEATH_BUMB_RAY       = 10042;
-float  DEATH_BUMB_RAY_HEAL  = 10043;
-float  DEATH_BUMB_DEATH     = 10044;
-float  DEATH_VHLAST         = 10044;
-#define DEATH_ISVEHICLE(t)  ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
-
-float DEATH_GENERIC = 10050;
-
-float DEATH_WEAPON = 10100;
-
-float DEATH_CUSTOM = 10300;
-
-float DEATH_TURRET                  = 10500;
-float DEATH_TURRET_EWHEEL           = 10501;
-float DEATH_TURRET_FLAC             = 10502;
-float DEATH_TURRET_MACHINEGUN       = 10503;
-float DEATH_TURRET_WALKER_GUN       = 10504;
-float DEATH_TURRET_WALKER_MEELE     = 10505;
-float DEATH_TURRET_WALKER_ROCKET    = 10506;
-float DEATH_TURRET_HELLION          = 10507;
-float DEATH_TURRET_HK               = 10508;
-float DEATH_TURRET_MLRS             = 10509;
-float DEATH_TURRET_PLASMA           = 10510;
-float DEATH_TURRET_PHASER           = 10511;
-float DEATH_TURRET_TESLA            = 10512;
-float DEATH_TURRET_LAST            = 10512;
-
-float DEATH_WEAPONMASK = 0xFF;
-float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal deaths
-float HITTYPE_SECONDARY = 0x100;
-float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage
-float HITTYPE_BOUNCE = 0x400;
-float HITTYPE_RESERVED2 = 0x800;
-float HITTYPE_RESERVED = 0x1000; // unused yet
-
-// macros to access these
-#define DEATH_ISTURRET(t)            ((t) >= DEATH_TURRET && (t) <= DEATH_TURRET_LAST)
-#define DEATH_ISSPECIAL(t)            ((t) >= DEATH_SPECIAL_START)
-#define DEATH_WEAPONOFWEAPONDEATH(t)  ((t) & DEATH_WEAPONMASK)
-#define DEATH_ISWEAPON(t,w)           (!DEATH_ISSPECIAL(t) && DEATH_WEAPONOFWEAPONDEATH(t) == (w))
-#define DEATH_WEAPONOF(t)             (DEATH_ISSPECIAL(t) ? 0 : DEATH_WEAPONOFWEAPONDEATH(t))
-#define WEP_VALID(w)                  ((w) >= WEP_FIRST && (w) <= WEP_LAST)
-
 #define FRAGS_PLAYER 0
 #define FRAGS_SPECTATOR -666
 #define FRAGS_LMS_LOSER -616
@@ -458,60 +378,14 @@ float WATERLEVEL_SUBMERGED = 3;
 float MAX_SHOT_DISTANCE = 32768;
 
 //centerprint ID list
-float CPID_TEAMCHANGE = 1;
 float CPID_CTF_CAPTURESHIELD = 2;
 float CPID_MINSTA_FINDAMMO = 3;
 float CPID_NIX_WPNCHANGE = 4;
-float CPID_DISCONNECT_IDLING = 5;
 float CPID_ROUND_STARTING = 6;
 float CPID_GAME_STARTING = 7;
 float CPID_TIMEOUT_COUNTDOWN = 8;
 float CPID_MOTD = 9;
 float CPID_KH_MSG = 10;
-float CPID_PREVENT_JOIN = 11;
-
-// CSQC centerprint/notify message types
-float MSG_SUICIDE = 0;
-float MSG_KILL = 1;
-float MSG_SPREE = 2;
-float MSG_KILL_ACTION = 3;
-float MSG_KILL_ACTION_SPREE = 4;
-float MSG_INFO = 5;
-float MSG_KA = 6;
-float MSG_RACE = 10;
-
-float KILL_TEAM_RED = 12001;
-float KILL_TEAM_BLUE = 12002;
-float KILL_TEAM_SPREE = 12003;
-float KILL_FIRST_BLOOD = 12004;
-float KILL_FIRST_VICTIM = 12005;
-float KILL_TYPEFRAG = 12006;
-float KILL_TYPEFRAGGED = 12007;
-float KILL_FRAG = 12008;
-float KILL_FRAGGED = 12009;
-float KILL_SPREE = 12010;
-float KILL_END_SPREE = 12011;
-float KILL_SPREE_3 = 12012;
-float KILL_SPREE_5 = 12013;
-float KILL_SPREE_10 = 12014;
-float KILL_SPREE_15 = 12015;
-float KILL_SPREE_20 = 12016;
-float KILL_SPREE_25 = 12017;
-float KILL_SPREE_30 = 12018;
-
-float INFO_GOTFLAG = 13001;
-float INFO_PICKUPFLAG = 13002;
-float INFO_LOSTFLAG = 13003;
-float INFO_RETURNFLAG = 13004;
-float INFO_CAPTUREFLAG = 13005;
-
-float KA_PICKUPBALL = 14001;
-float KA_DROPBALL = 14002;
-
-float RACE_SERVER_RECORD = 15001;
-float RACE_NEW_TIME = 15002;
-float RACE_NEW_RANK = 15003;
-float RACE_FAIL = 15004;
 
 // weapon requests
 float WR_SETUP         = 1; // (SVQC) setup weapon data
diff --git a/qcsrc/common/deathtypes.qh b/qcsrc/common/deathtypes.qh
new file mode 100644 (file)
index 0000000..2549858
--- /dev/null
@@ -0,0 +1,99 @@
+// Deathtypes (weapon deathtypes are the IT_* constants below)
+// NOTE: when adding death types, please add an explanation to Docs/spamlog.txt too.
+#define DT_FIRST 10000
+#define DT_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
+float DT_COUNT;
+
+#define DT_MATCH(a,b) if(min(DT_MAX, a) == b)
+
+#define DEATHTYPE(name,msg_death,msg_death_by,position) \
+       float name; \
+       float position; \
+       void RegisterDeathtype_##name() \
+       { \
+               SET_FIRST_OR_LAST(position, DT_FIRST, DT_COUNT) \
+               SET_FIELD_COUNT(name, DT_FIRST, DT_COUNT) \
+               CHECK_MAX_COUNT(name, DT_MAX, DT_COUNT, "deathtypes") \
+       } \
+       ACCUMULATE_FUNCTION(RegisterDeathtypes, RegisterDeathtype_##name)
+
+#define DEATHTYPES \
+       DEATHTYPE(DEATH_FALL,                                   DEATH_SELF_FALL,                                        DEATH_MURDER_FALL,                              DEATH_SPECIAL_START) \
+       DEATHTYPE(DEATH_TELEFRAG,                               NO_MSG,                                                         DEATH_MURDER_TELEFRAG,                  NORMAL_POS) \
+       DEATHTYPE(DEATH_DROWN,                                  DEATH_SELF_DROWN,                                       DEATH_MURDER_DROWN,                     NORMAL_POS) \
+       DEATHTYPE(DEATH_HURTTRIGGER,                    DEATH_SELF_VOID,                                        DEATH_MURDER_VOID,                              NORMAL_POS) \
+       DEATHTYPE(DEATH_LAVA,                                   DEATH_SELF_LAVA,                                        DEATH_MURDER_LAVA,                              NORMAL_POS) \
+       DEATHTYPE(DEATH_SLIME,                                  DEATH_SELF_SLIME,                                       DEATH_MURDER_SLIME,                             NORMAL_POS) \
+       DEATHTYPE(DEATH_KILL,                                   DEATH_SELF_SUICIDE,                             NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_NOAMMO,                                 DEATH_SELF_NOAMMO,                                      NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_SWAMP,                                  DEATH_SELF_SWAMP,                                       DEATH_MURDER_SWAMP,                     NORMAL_POS) \
+       DEATHTYPE(DEATH_TEAMCHANGE,                     DEATH_SELF_TEAMCHANGE,                          NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_AUTOTEAMCHANGE,                 DEATH_SELF_AUTOTEAMCHANGE,                      NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_CAMP,                                   DEATH_SELF_CAMP,                                        NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_SHOOTING_STAR,                  DEATH_SELF_SHOOTING_STAR,                       DEATH_MURDER_SHOOTING_STAR,     NORMAL_POS) \
+       DEATHTYPE(DEATH_ROT,                                    DEATH_SELF_ROT,                                         NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_MIRRORDAMAGE,                   DEATH_SELF_BETRAYAL,                            NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TOUCHEXPLODE,                   DEATH_SELF_TOUCHEXPLODE,                        DEATH_MURDER_TOUCHEXPLODE,              NORMAL_POS) \
+       DEATHTYPE(DEATH_CHEAT,                                  DEATH_SELF_CHEAT,                                       DEATH_MURDER_CHEAT,                     NORMAL_POS) \
+       DEATHTYPE(DEATH_FIRE,                                   DEATH_SELF_FIRE,                                        DEATH_MURDER_FIRE,                              NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_CRUSH,                               DEATH_SELF_VH_CRUSH,                            DEATH_MURDER_VH_CRUSH,                  DEATH_VHFIRST) \
+       DEATHTYPE(DEATH_VH_SPID_MINIGUN,                NO_MSG,                                                         DEATH_MURDER_VH_SPID_MINIGUN,   NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_SPID_ROCKET,                 DEATH_SELF_VH_SPID_ROCKET,                      DEATH_MURDER_VH_SPID_ROCKET,    NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_SPID_DEATH,                  DEATH_SELF_VH_SPID_DEATH,                       DEATH_MURDER_VH_SPID_DEATH,             NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_WAKI_GUN,                    NO_MSG,                                                         DEATH_MURDER_VH_WAKI_GUN,               NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_WAKI_ROCKET,                 DEATH_SELF_VH_WAKI_ROCKET,                      DEATH_MURDER_VH_WAKI_ROCKET,    NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_WAKI_DEATH,                  DEATH_SELF_VH_WAKI_DEATH,                       DEATH_MURDER_VH_WAKI_DEATH,             NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_RAPT_CANNON,                 NO_MSG,                                                         DEATH_MURDER_VH_RAPT_CANNON,    NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_RAPT_BOMB,                   DEATH_SELF_VH_RAPT_BOMB,                        DEATH_MURDER_VH_RAPT_BOMB,              NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_RAPT_FRAGMENT,               DEATH_SELF_VH_RAPT_BOMB,                        DEATH_MURDER_VH_RAPT_BOMB,              NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_RAPT_DEATH,                  DEATH_SELF_VH_RAPT_DEATH,                       DEATH_MURDER_VH_RAPT_DEATH,             NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_BUMB_GUN,                    NO_MSG,                                                         DEATH_MURDER_VH_BUMB_GUN,               NORMAL_POS) \
+       DEATHTYPE(DEATH_VH_BUMB_DEATH,                  DEATH_SELF_VH_BUMB_DEATH,                       DEATH_MURDER_VH_BUMB_DEATH,             DEATH_VHLAST) \
+       DEATHTYPE(DEATH_TURRET,                                 DEATH_SELF_TURRET,                                      NO_MSG,                                                 DEATH_TURRET_FIRST) \
+       DEATHTYPE(DEATH_TURRET_EWHEEL,                  DEATH_SELF_TURRET_EWHEEL,                       NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_FLAC,                    DEATH_SELF_TURRET_FLAC,                         NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_MACHINEGUN,              DEATH_SELF_TURRET_MACHINEGUN,           NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_WALK_GUN,                DEATH_SELF_TURRET_WALK_GUN,                     NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_WALK_MEELE,              DEATH_SELF_TURRET_WALK_MEELE,           NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_WALK_ROCKET,             DEATH_SELF_TURRET_WALK_ROCKET,          NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_HELLION,                 DEATH_SELF_TURRET_HELLION,                      NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_HK,                              DEATH_SELF_TURRET_HK,                           NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_MLRS,                    DEATH_SELF_TURRET_MLRS,                         NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_PLASMA,                  DEATH_SELF_TURRET_PLASMA,                       NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_PHASER,                  DEATH_SELF_TURRET_PHASER,                       NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_TURRET_TESLA,                   DEATH_SELF_TURRET_TESLA,                        NO_MSG,                                                 DEATH_TURRET_LAST) \
+       DEATHTYPE(DEATH_GENERIC,                                DEATH_SELF_GENERIC,                             NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_WEAPON,                                 NO_MSG,                                                         NO_MSG,                                                 NORMAL_POS) \
+       DEATHTYPE(DEATH_CUSTOM,                                 DEATH_SELF_CUSTOM,                                      NO_MSG,                                                 NORMAL_POS)
+
+DEATHTYPES
+#undef DEATHTYPE
+
+#define DEATH_ISSPECIAL(t)                             ((t) >= DEATH_SPECIAL_START)
+#define DEATH_ISVEHICLE(t)                             ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
+#define DEATH_ISTURRET(t)                              ((t) >= DEATH_TURRET_FIRST && (t) <= DEATH_TURRET_LAST)
+#define DEATH_WEAPONOFWEAPONDEATH(t)   ((t) & DEATH_WEAPONMASK)
+#define DEATH_ISWEAPON(t,w)                            (!DEATH_ISSPECIAL(t) && DEATH_WEAPONOFWEAPONDEATH(t) == (w))
+#define DEATH_WEAPONOF(t)                              (DEATH_ISSPECIAL(t) ? 0 : DEATH_WEAPONOFWEAPONDEATH(t))
+#define WEP_VALID(w)                                   ((w) >= WEP_FIRST && (w) <= WEP_LAST)
+
+string Deathtype_Name(float deathtype)
+{
+       if(DEATH_ISSPECIAL(deathtype))
+       {
+               #define DEATHTYPE(name,msg_death,msg_death_by,position) \
+                       { if(deathtype == max(0, name)) return VAR_TO_TEXT(name); }
+
+               DEATHTYPES
+               #undef DEATHTYPE
+       }
+       return "foobar";
+}
+
+float DEATH_WEAPONMASK = 0xFF;
+float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal deaths
+float HITTYPE_SECONDARY = 0x100;
+float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage
+float HITTYPE_BOUNCE = 0x400;
+float HITTYPE_RESERVED2 = 0x800;
+float HITTYPE_RESERVED = 0x1000; // unused yet
diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc
new file mode 100644 (file)
index 0000000..b25dde7
--- /dev/null
@@ -0,0 +1,683 @@
+// ================================================
+//  Unified notification system, written by Samual
+//  Last updated: February, 2013
+// ================================================
+
+entity Get_Notif_Ent(float net_type, float net_name)
+{
+       switch(net_type)
+       {
+               case MSG_INFO: return msg_info_notifs[net_name - 1];
+               case MSG_CENTER: return msg_center_notifs[net_name - 1];
+               case MSG_WEAPON: return msg_weapon_notifs[net_name - 1];
+               case MSG_DEATH: return msg_death_notifs[net_name - 1];
+       }
+       backtrace(sprintf("Get_Notif_Ent(%d, %d): Improper net type!\n", net_type, net_name));
+       return world;
+}
+
+
+// ===============================
+//  Frontend Notification Pushing
+// ===============================
+
+void Dump_Notifications(float fh, float alsoprint)
+{
+       #define NOTIF_WRITE(a) { \
+               fputs(fh, a); \
+               if(alsoprint) { print(a); } }
+       #define NOTIF_WRITE_SETA(name,default,text) { \
+               notif_msg = \
+                       sprintf( \
+                               "seta notification_%s %d \"notif string: %s^7\"\n", \
+                               name, default, strreplace("\{3}", "", strreplace("\n", "\\n", text)) \
+                       ); \
+               NOTIF_WRITE(notif_msg) }
+
+       string notif_msg;
+       float i;
+       entity e;
+
+       // Note: This warning only applies to the notifications.cfg file that is output...
+
+       // You ARE supposed to manually edit this function to add i.e. hard coded
+       // notification variables for mutators or game modes or such and then
+       // regenerate the notifications.cfg file from the new code.
+
+       NOTIF_WRITE("// ********************************************** //\n");
+       NOTIF_WRITE("// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n");
+       NOTIF_WRITE("// **                                          ** //\n");
+       NOTIF_WRITE("// **  This file is automatically generated    ** //\n");
+       NOTIF_WRITE("// **  by code with the command 'dumpnotifs'.  ** //\n");
+       NOTIF_WRITE("// **                                          ** //\n");
+       NOTIF_WRITE("// **  If you add a new notification, please   ** //\n");
+       NOTIF_WRITE("// **  regenerate this file with that command  ** //\n");
+       NOTIF_WRITE("// **  making sure that the output matches     ** //\n");
+       NOTIF_WRITE("// **  with the lists and defaults in code.    ** //\n");
+       NOTIF_WRITE("// **                                          ** //\n");
+       NOTIF_WRITE("// ********************************************** //\n");
+
+       // These notifications will also append their string as a comment...
+       // This is not necessary, and does not matter if they vary between config versions,
+       // it is just a semi-helpful tool for those who want to manually change their user settings.
+
+       NOTIF_WRITE(sprintf("\n// MSG_INFO notifications (count = %d):\n", NOTIF_INFO_COUNT));
+       for(i = 1; i <= NOTIF_INFO_COUNT; ++i)
+       {
+               e = Get_Notif_Ent(MSG_INFO, i);
+               if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+               NOTIF_WRITE_SETA(e.nent_name, e.nent_default, e.nent_string);
+       }
+
+       NOTIF_WRITE(sprintf("\n// MSG_CENTER notifications (count = %d):\n", NOTIF_CENTER_COUNT));
+       for(i = 1; i <= NOTIF_CENTER_COUNT; ++i)
+       {
+               e = Get_Notif_Ent(MSG_CENTER, i);
+               if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+               NOTIF_WRITE_SETA(e.nent_name, e.nent_default, e.nent_string);
+       }
+
+       NOTIF_WRITE(sprintf("\n// MSG_WEAPON notifications (count = %d):\n", NOTIF_WEAPON_COUNT));
+       for(i = 1; i <= NOTIF_WEAPON_COUNT; ++i)
+       {
+               e = Get_Notif_Ent(MSG_WEAPON, i);
+               if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+               NOTIF_WRITE_SETA(e.nent_name, e.nent_default, sprintf("infoname: %s, centername: %s",
+                       e.nent_msginfo.nent_name, e.nent_msgcenter.nent_name));
+       }
+
+       NOTIF_WRITE(sprintf("\n// MSG_DEATH notifications (count = %d):\n", NOTIF_DEATH_COUNT));
+       for(i = 1; i <= NOTIF_DEATH_COUNT; ++i)
+       {
+               e = Get_Notif_Ent(MSG_DEATH, i);
+               if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+               NOTIF_WRITE_SETA(e.nent_name, e.nent_default, sprintf("infoname: %s, centername: %s",
+                       e.nent_msginfo.nent_name, e.nent_msgcenter.nent_name));
+       }
+
+       // edit these to match whichever cvars are used for specific notification options
+       NOTIF_WRITE("\n// HARD CODED notification variables:\n");
+       NOTIF_WRITE("seta notification_allow_chatboxprint 1 \"Allow notifications to be printed to chat box by setting notification cvar to 2 (You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)\"\n");
+       NOTIF_WRITE("seta notification_show_location 0 \"Append location information to MSG_INFO death/kill messages\"\n");
+       NOTIF_WRITE("seta notification_show_location_string \"\" \"Replacement string piped into sprintf, so you can do different messages like this: ' at the %s' or ' (near %s)'\"\n");
+       NOTIF_WRITE("seta notification_show_sprees 1 \"Print information about sprees in death/kill messages\"\n");
+       NOTIF_WRITE("seta notification_show_sprees_center 1 \"Show spree information in MSG_CENTER messages... 0 = off, 1 = target (but only for first victim) and attacker\"\n");
+       NOTIF_WRITE("seta notification_show_sprees_center_specialonly 1 \"Don't show spree information in MSG_CENTER messages if it isn't an achievement\"\n");
+       NOTIF_WRITE("seta notification_show_sprees_info 3 \"Show spree information in MSG_INFO messages... 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker\"\n");
+       NOTIF_WRITE("seta notification_show_sprees_info_newline 0 \"Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself\"\n");
+       NOTIF_WRITE("seta notification_show_sprees_info_specialonly 1 \"Don't show attacker spree information in MSG_INFO messages if it isn't an achievement\"\n");
+       NOTIF_WRITE("seta notification_errors_are_fatal 1 \"If a notification fails upon initialization, cause a Host_Error to stop the program\"\n");
+       NOTIF_WRITE("seta notification_ctf_pickup_team_verbose 1 \"Show extra information if a team mate picks up a flag\"\n");
+       NOTIF_WRITE("seta notification_ctf_pickup_enemy_verbose 1 \"Show extra information if an enemy picks up a flag\"\n");
+       NOTIF_WRITE("seta notification_ctf_capture_verbose 1 \"Show extra information when someone captures a flag\"\n");
+       NOTIF_WRITE("seta notification_frag_verbose 1 \"Show extra information when you frag someone (or when you are fragged\"\n");
+
+       NOTIF_WRITE(sprintf("\n// Notification counts (total = %d): MSG_INFO = %d, MSG_CENTER = %d, MSG_WEAPON = %d, MSG_DEATH = %d\n",
+               (NOTIF_INFO_COUNT + NOTIF_CENTER_COUNT + NOTIF_WEAPON_COUNT + NOTIF_DEATH_COUNT), 
+               NOTIF_INFO_COUNT, NOTIF_CENTER_COUNT, NOTIF_WEAPON_COUNT, NOTIF_DEATH_COUNT));
+       
+       return;
+       #undef NOTIF_WRITE_SETA
+       #undef NOTIF_WRITE
+}
+
+#ifdef SVQC
+void Notification_GetCvars()
+{
+       GetCvars_handleFloat(get_cvars_s, get_cvars_f, FRAG_VERBOSE, "notification_frag_verbose");
+}
+#endif
+
+string Local_Notification_sprintf(string input, string args, 
+       string s1, string s2, string s3, string s4,
+       float f1, float f2, float f3, float f4)
+{
+       #ifdef NOTIFICATIONS_DEBUG
+       dprint(
+               sprintf("Local_Notification_sprintf('%s^7', '%s', %s, %s);\n",
+                       strreplace("\n", "\\n", input),
+                       args,
+                       sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4),
+                       sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
+               )
+       );
+       #endif
+       
+       string selected;
+       float sel_num;
+       for(sel_num = 0; sel_num < NOTIF_MAX_ARGS; ++sel_num) { arg_slot[sel_num] = ""; }
+
+       string tmp_s;
+
+       for(sel_num = 0;(args != "");)
+       {
+               selected = car(args); args = cdr(args);
+               NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
+               switch(strtolower(selected))
+               {
+                       #define ARG_CASE(prog,selected,result) \
+                               #ifdef CSQC \
+                                       #if (prog != ARG_SV) \
+                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
+                                       #endif \
+                               #else \
+                                       #if (prog != ARG_CS) \
+                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
+                                       #endif \
+                               #endif
+                       NOTIF_ARGUMENT_LIST
+                       #undef ARG_CASE
+                       default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
+               }
+       }
+       return sprintf(input, arg_slot[0], arg_slot[1], arg_slot[2], arg_slot[3], arg_slot[4], arg_slot[5], arg_slot[6]);
+}
+
+#ifdef CSQC
+void Local_Notification_HUD_Notify_Push(string icon, string hudargs, string s1, string s2, string s3, string s4)
+{
+       string selected;
+       float sel_num;
+       arg_slot[0] = ""; arg_slot[1] = "";
+
+       for(sel_num = 0;(hudargs != "");)
+       {
+               selected = car(hudargs); hudargs = cdr(hudargs);
+               NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
+               switch(strtolower(selected))
+               {
+                       #define ARG_CASE(prog,selected,result) \
+                               #if (prog == ARG_CS_SV_HA) \
+                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
+                               #endif
+                       NOTIF_ARGUMENT_LIST
+                       #undef ARG_CASE
+                       default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
+               }
+       }
+       HUD_Notify_Push(icon, arg_slot[0], arg_slot[1]);
+}
+
+void Local_Notification_centerprint_generic(string input, string durcnt, float cpid, float f1, float f2)
+{
+       string selected;
+       float sel_num;
+       arg_slot[0] = ""; arg_slot[1] = "";
+
+       for(sel_num = 0;(durcnt != "");)
+       {
+               selected = car(durcnt); durcnt = cdr(durcnt);
+               NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic")
+               switch(strtolower(selected))
+               {
+                       #define ARG_CASE(prog,selected,result) \
+                               #if (prog == ARG_CS_SV_DC) \
+                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
+                               #endif
+                       NOTIF_ARGUMENT_LIST
+                       #undef ARG_CASE
+                       default:
+                       {
+                               if(ftos(stof(selected)) != "") { arg_slot[sel_num] = selected; ++sel_num; }
+                               else { NOTIF_HIT_UNKNOWN(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic") }
+                               break;
+                       }
+               }
+       }
+       centerprint_generic(cpid, input, stof(arg_slot[0]), stof(arg_slot[1]));
+}
+#endif
+
+void Local_Notification(float net_type, float net_name, ...count)
+{
+       // check supplied type and name for errors
+       string checkargs = "";
+       #define CHECKARG_TYPENAME(type) case MSG_##type##: \
+               { if(!net_name || (net_name > NOTIF_##type##_COUNT)) \
+               { checkargs = sprintf("Improper name: %d!", net_name); } break; }
+       switch(net_type)
+       {
+               CHECKARG_TYPENAME(INFO)
+               CHECKARG_TYPENAME(CENTER)
+               CHECKARG_TYPENAME(WEAPON)
+               CHECKARG_TYPENAME(DEATH)
+               default: { checkargs = sprintf("Improper type: %d!", checkargs, net_type); break; }
+       }
+       #undef CHECKARG_TYPENAME
+       if(checkargs != "") { backtrace(sprintf("Incorrect usage of Local_Notification: %s\n", checkargs)); return; }
+
+       entity notif = Get_Notif_Ent(net_type, net_name);
+       if not(notif) { backtrace("Local_Notification: Could not find notification entity!\n"); return; }
+       if not(notif.nent_enabled) { print("Local_Notification: Entity was disabled...\n"); return; }
+
+       if((notif.nent_stringcount + notif.nent_floatcount) > count)
+       {
+               backtrace(sprintf(
+                       strcat(
+                               "Not enough arguments for Local_Notification(%d, %s, ...)! ",
+                               "stringcount(%d) + floatcount(%d) > count(%d)\n", 
+                               "Check the definition and function call for accuracy...?\n"
+                       ),
+                       net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
+               return;
+       }
+       else if((notif.nent_stringcount + notif.nent_floatcount) < count)
+       {
+               backtrace(sprintf(
+                       strcat(
+                               "Too many arguments for Local_Notification(%d, %s, ...)! ",
+                               "stringcount(%d) + floatcount(%d) < count(%d)\n",
+                               "Check the definition and function call for accuracy...?\n"
+                       ),
+                       net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
+               return;
+       }
+
+       string s1 = ((0 < notif.nent_stringcount) ? ...(0, string) : "");
+       string s2 = ((1 < notif.nent_stringcount) ? ...(1, string) : "");
+       string s3 = ((2 < notif.nent_stringcount) ? ...(2, string) : "");
+       string s4 = ((3 < notif.nent_stringcount) ? ...(3, string) : "");
+       float f1 = ((0 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 0), float) : 0);
+       float f2 = ((1 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 1), float) : 0);
+       float f3 = ((2 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 2), float) : 0);
+       float f4 = ((3 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 3), float) : 0);
+
+       #ifdef NOTIFICATIONS_DEBUG
+       dprint(
+               sprintf("Local_Notification(%d, %s, %s, %s);\n",
+                       net_type,
+                       notif.nent_name,
+                       sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4),
+                       sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
+               )
+       );
+       #endif
+       
+       switch(net_type)
+       {
+               case MSG_INFO:
+               {
+                       print(
+                               Local_Notification_sprintf(
+                                       notif.nent_string,
+                                       notif.nent_args, 
+                                       s1, s2, s3, s4,
+                                       f1, f2, f3, f4)
+                       );
+                       #ifdef CSQC 
+                       if(notif.nent_icon != "")
+                       {
+                               Local_Notification_HUD_Notify_Push(
+                                       notif.nent_icon,
+                                       notif.nent_hudargs,
+                                       s1, s2, s3, s4);
+                       } 
+                       #endif 
+                       break;
+               }
+               
+               #ifdef CSQC
+               case MSG_CENTER:
+               {
+                       Local_Notification_centerprint_generic(
+                               Local_Notification_sprintf(
+                                       notif.nent_string,
+                                       notif.nent_args, 
+                                       s1, s2, s3, s4,
+                                       f1, f2, f3, f4),
+                               notif.nent_durcnt,
+                               notif.nent_cpid,
+                               f1, f2);
+                       break;
+               }
+               #endif
+               
+               case MSG_WEAPON:
+               case MSG_DEATH:
+               {
+                       if(notif.nent_msginfo)
+                       if(notif.nent_msginfo.nent_enabled)
+                       {
+                               Local_Notification_WOVA(
+                                       MSG_INFO,
+                                       notif.nent_msginfo.nent_id, 
+                                       notif.nent_msginfo.nent_stringcount, 
+                                       notif.nent_msginfo.nent_floatcount, 
+                                       s1, s2, s3, s4,
+                                       f1, f2, f3, f4);
+                       }
+                       #ifdef CSQC
+                       if(notif.nent_msgcenter)
+                       if(notif.nent_msgcenter.nent_enabled)
+                       {
+                               Local_Notification_WOVA(
+                                       MSG_CENTER,
+                                       notif.nent_msgcenter.nent_id, 
+                                       notif.nent_msgcenter.nent_stringcount, 
+                                       notif.nent_msgcenter.nent_floatcount, 
+                                       s1, s2, s3, s4,
+                                       f1, f2, f3, f4); 
+                       }
+                       #endif
+                       break;
+               }
+       }
+}
+
+// WOVA = Without Variable Arguments 
+void Local_Notification_WOVA(float net_type, float net_name,
+       float stringcount, float floatcount,
+       string s1, string s2, string s3, string s4,
+       float f1, float f2, float f3, float f4)
+{
+       #define VARITEM(stringc,floatc,args) \
+               if((stringcount == stringc) && (floatcount == floatc)) \
+                       { Local_Notification(net_type, net_name, args); return; }
+       EIGHT_VARS_TO_VARARGS_VARLIST
+       #undef VARITEM
+       Local_Notification(net_type, net_name); // some notifications don't have any arguments at all
+}
+
+
+// =========================
+//  Notification Networking
+// =========================
+
+#ifdef CSQC
+void Read_Notification(float is_new)
+{
+       float net_type = ReadByte();
+       float net_name = ReadShort();
+
+       entity notif = Get_Notif_Ent(net_type, net_name);
+       if not(notif) { print("Read_Notification: Could not find notification entity!\n"); return; }
+
+       string s1 = ((0 < notif.nent_stringcount) ? ReadString() : "");
+       string s2 = ((1 < notif.nent_stringcount) ? ReadString() : "");
+       string s3 = ((2 < notif.nent_stringcount) ? ReadString() : "");
+       string s4 = ((3 < notif.nent_stringcount) ? ReadString() : "");
+       float f1 = ((0 < notif.nent_floatcount) ? ReadLong() : 0);
+       float f2 = ((1 < notif.nent_floatcount) ? ReadLong() : 0);
+       float f3 = ((2 < notif.nent_floatcount) ? ReadLong() : 0);
+       float f4 = ((3 < notif.nent_floatcount) ? ReadLong() : 0);
+
+       #ifdef NOTIFICATIONS_DEBUG
+       dprint(sprintf("Read_Notification(%d) at %f: net_name = %s.\n", is_new, time, notif.nent_name));
+       #endif
+       
+       if(is_new)
+       {
+               Local_Notification_WOVA(
+                       net_type, net_name,
+                       notif.nent_stringcount,
+                       notif.nent_floatcount,
+                       s1, s2, s3, s4,
+                       f1, f2, f3, f4);
+       }
+}
+#endif
+
+#ifdef SVQC
+void Net_Notification_Remove()
+{
+       float i;
+       for(i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
+       remove(self);
+}
+
+float Net_Write_Notification(entity client, float sf)
+{
+       float i, send = FALSE;
+       
+       switch(self.nent_broadcast)
+       {
+               case NOTIF_ONE: // send to one client and their spectator
+               {
+                       if(
+                               (client == self.nent_client)
+                               ||
+                               (
+                                       (client.classname == STR_SPECTATOR)
+                                       &&
+                                       (client.enemy == self.nent_client)
+                               )
+                       ) { send = TRUE; }
+                       break;
+               }
+               case NOTIF_ONE_ONLY: // send ONLY to one client
+               {
+                       if(client == self.nent_client) { send = TRUE; }
+                       break;
+               }
+               case NOTIF_TEAM: // send only to X team and their spectators
+               {
+                       if(
+                               (client.team == self.nent_client.team)
+                               ||
+                               (
+                                       (client.classname == STR_SPECTATOR)
+                                       &&
+                                       (client.enemy.team == self.nent_client.team)
+                               )
+                       ) { send = TRUE; }
+                       break;
+               }
+               case NOTIF_TEAM_EXCEPT: // send only to X team and their spectators, except for Y person and their spectators
+               {
+                       if(
+                               (client != self.nent_client)
+                               &&
+                               (
+                                       (client.team == self.nent_client.team)
+                                       ||
+                                       (
+                                               (client.classname == STR_SPECTATOR)
+                                               &&
+                                               (
+                                                       (client.enemy != self.nent_client)
+                                                       &&
+                                                       (client.enemy.team == self.nent_client.team)
+                                               )
+                                       )
+                               )
+                       ) { send = TRUE; }
+                       break;
+               }
+               case NOTIF_ANY: // send to everyone
+               {
+                       send = TRUE;
+                       break;
+               }
+               case NOTIF_ANY_EXCEPT: // send to everyone except X person and their spectators
+               {
+                       if(
+                               (client != self.nent_client)
+                               &&
+                               !(
+                                       (client.classname == STR_SPECTATOR)
+                                       &&
+                                       (client.enemy == self.nent_client)
+                               )
+                       ) { send = TRUE; }
+                       break;
+               }
+               default: { send = FALSE; break; }
+       }
+
+       if(send)
+       {               
+               WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
+               WriteByte(MSG_ENTITY, self.nent_net_type);
+               WriteShort(MSG_ENTITY, self.nent_net_name);
+               for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); } 
+               for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
+       }
+
+       return send; 
+}
+
+void Send_Notification(float broadcast, entity client,
+       float net_type, float net_name, ...count)
+{
+       // check supplied broadcast, target, type, and name for errors
+       string checkargs = "";
+       #define CHECKARG_TYPENAME(type) case MSG_##type##: \
+               { if(!net_name || (net_name > NOTIF_##type##_COUNT)) \
+               { checkargs = sprintf("Improper name: %d!", net_name); } break; }
+       switch(net_type)
+       {
+               CHECKARG_TYPENAME(INFO)
+               CHECKARG_TYPENAME(CENTER)
+               CHECKARG_TYPENAME(WEAPON)
+               CHECKARG_TYPENAME(DEATH)
+               default: { checkargs = sprintf("Improper type: %d!", checkargs, net_type); break; }
+       }
+       #undef CHECKARG_TYPENAME
+       if(checkargs != "") { checkargs = strcat(checkargs, " "); }
+       switch(broadcast)
+       {
+               case NOTIF_ONE:
+               case NOTIF_ONE_ONLY:
+               {
+                       if(IS_NOT_A_CLIENT(client))
+                               { checkargs = sprintf("%sNo client provided!", checkargs); }
+                       break;
+               }
+               
+               case NOTIF_ANY_EXCEPT:
+               {
+                       if(IS_NOT_A_CLIENT(client))
+                               { checkargs = sprintf("%sException can't be a non-client!", checkargs); }
+                       break;
+               }
+               
+               case NOTIF_ANY:
+               {
+                       if(client)
+                               { checkargs = sprintf("%sEntity provided when world was required!", checkargs); }
+                       break;
+               }
+               
+               case NOTIF_TEAM:
+               case NOTIF_TEAM_EXCEPT:
+               {
+                       if not(teamplay) { checkargs = sprintf("%sTeamplay not active!", checkargs); }
+                       else if(IS_NOT_A_CLIENT(client))
+                       {
+                               if(broadcast == NOTIF_TEAM) { checkargs = sprintf("%sNo client provided!", checkargs); }
+                               else { checkargs = sprintf("%sException can't be a non-client!", checkargs); }
+                       }
+                       break;
+               }
+               
+               default: { checkargs = sprintf("%sImproper broadcast: %d!", checkargs, broadcast); break; }
+       }
+       if(checkargs != "") { backtrace(sprintf("Incorrect usage of Send_Notification: %s\n", checkargs)); return; }
+
+       // retreive counts for the arguments of this notification
+       entity notif = Get_Notif_Ent(net_type, net_name);
+       if not(notif) { backtrace("Send_Notification: Could not find notification entity!\n"); return; }
+
+       if((notif.nent_stringcount + notif.nent_floatcount) > count)
+       {
+               backtrace(sprintf(
+                       strcat(
+                               "Not enough arguments for Send_Notification(%d, %d, %s, ...)! ",
+                               "stringcount(%d) + floatcount(%d) > count(%d)\n", 
+                               "Check the definition and function call for accuracy...?\n"
+                       ),
+                       broadcast, net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
+               return;
+       }
+       else if((notif.nent_stringcount + notif.nent_floatcount) < count)
+       {
+               backtrace(sprintf(
+                       strcat(
+                               "Too many arguments for Send_Notification(%d, %d, %s, ...)! ",
+                               "stringcount(%d) + floatcount(%d) < count(%d)\n",
+                               "Check the definition and function call for accuracy...?\n"
+                       ),
+                       broadcast, net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
+               return;
+       }
+       
+       #ifdef NOTIFICATIONS_DEBUG
+       dprint(
+               sprintf("Send_Notification(%d, %d, %s, stringcount: %d, floatcount: %d, varargs: %d);\n",
+                       broadcast,
+                       net_type,
+                       notif.nent_name,
+                       notif.nent_stringcount,
+                       notif.nent_floatcount,
+                       count
+               )
+       );
+       #endif
+
+       entity net_notif = spawn();
+       net_notif.nent_broadcast = broadcast;
+       net_notif.nent_client = client;
+       net_notif.nent_net_type = net_type;
+       net_notif.nent_net_name = net_name;
+       net_notif.nent_stringcount = notif.nent_stringcount;
+       net_notif.nent_floatcount = notif.nent_floatcount;
+       
+       float i;
+       for(i = 0; i < net_notif.nent_stringcount; ++i) { net_notif.nent_strings[i] = strzone(...(i, string)); }
+       for(i = 0; i < net_notif.nent_floatcount; ++i) { net_notif.nent_floats[i] = ...((net_notif.nent_stringcount + i), float); }
+       
+       net_notif.think = Net_Notification_Remove;
+       net_notif.nextthink = (time + 0.5); 
+
+       Net_LinkEntity(net_notif, FALSE, 0, Net_Write_Notification);
+
+       if((!server_is_local) && (broadcast == NOTIF_ANY || broadcast == NOTIF_ANY_EXCEPT) && (net_type != MSG_CENTER))
+       {
+               Local_Notification_WOVA(
+                       net_type, net_name,
+                       notif.nent_stringcount,
+                       notif.nent_floatcount,
+                       IFSTR(0), IFSTR(1), IFSTR(2), IFSTR(3),
+                       IFFL(0), IFFL(1), IFFL(2), IFFL(3));
+       }
+}
+
+// WOVA = Without Variable Arguments 
+void Send_Notification_WOVA(float broadcast, entity client,
+       float net_type, float net_name,
+       string s1, string s2, string s3, string s4,
+       float f1, float f2, float f3, float f4)
+{
+       entity notif = Get_Notif_Ent(net_type, net_name);
+       #define VARITEM(stringc,floatc,args) \
+               if((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
+                       { Send_Notification(broadcast, client, net_type, net_name, args); return; }
+       EIGHT_VARS_TO_VARARGS_VARLIST
+       #undef VARITEM
+       Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
+}
+
+
+// =============================
+//  LEGACY NOTIFICATION SYSTEMS
+// =============================
+
+void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num)
+{
+       if ((clienttype(e) == CLIENTTYPE_REAL) && (e.flags & FL_CLIENT))
+       {
+               msg_entity = e;
+               WRITESPECTATABLE_MSG_ONE({
+                       WriteByte(MSG_ONE, SVC_TEMPENTITY);
+                       WriteByte(MSG_ONE, TE_CSQC_CENTERPRINT_GENERIC);
+                       WriteByte(MSG_ONE, id);
+                       WriteString(MSG_ONE, s);
+                       if (id != 0 && s != "")
+                       {
+                               WriteByte(MSG_ONE, duration);
+                               WriteByte(MSG_ONE, countdown_num);
+                       }
+               });
+       }
+}
+#endif // ifdef SVQC
diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh
new file mode 100644 (file)
index 0000000..5ed7fd4
--- /dev/null
@@ -0,0 +1,1204 @@
+// ================================================
+//  Unified notification system, written by Samual
+//  Last updated: February, 2013
+// ================================================
+
+// main types/groups of notifications
+#define MSG_INFO 1 // "Global" information messages (sent to console, and notify panel if it has an icon)
+#define MSG_CENTER 2 // "Personal" centerprint messages
+#define MSG_WEAPON 3 // "Personal" weapon messages (like "You got the Nex", sent to weapon notify panel)
+#define MSG_DEATH 4 // "Personal" AND "Global" death messages 
+
+#define NO_MSG -12345 
+
+#define EIGHT_VARS_TO_VARARGS_VARLIST \
+       VARITEM(1, 0, s1) \
+       VARITEM(2, 0, XPD(s1, s2)) \
+       VARITEM(3, 0, XPD(s1, s2, s3)) \
+       VARITEM(4, 0, XPD(s1, s2, s3, s4)) \
+       VARITEM(0, 1, f1) \
+       VARITEM(1, 1, XPD(s1, f1)) \
+       VARITEM(2, 1, XPD(s1, s2, f1)) \
+       VARITEM(3, 1, XPD(s1, s2, s3, f1)) \
+       VARITEM(4, 1, XPD(s1, s2, s3, s4, f1)) \
+       VARITEM(0, 2, XPD(f1, f2)) \
+       VARITEM(1, 2, XPD(s1, f1, f2)) \
+       VARITEM(2, 2, XPD(s1, s2, f1, f2)) \
+       VARITEM(3, 2, XPD(s1, s2, s3, f1, f2)) \
+       VARITEM(4, 2, XPD(s1, s2, s3, s4, f1, f2)) \
+       VARITEM(0, 3, XPD(f1, f2, f3)) \
+       VARITEM(1, 3, XPD(s1, f1, f2, f3)) \
+       VARITEM(2, 3, XPD(s1, s2, f1, f2, f3)) \
+       VARITEM(3, 3, XPD(s1, s2, s3, f1, f2, f3)) \
+       VARITEM(4, 3, XPD(s1, s2, s3, s4, f1, f2, f3)) \
+       VARITEM(0, 4, XPD(f1, f2, f3, f4)) \
+       VARITEM(1, 4, XPD(s1, f1, f2, f3, f4)) \
+       VARITEM(2, 4, XPD(s1, s2, f1, f2, f3, f4)) \
+       VARITEM(3, 4, XPD(s1, s2, s3, f1, f2, f3, f4)) \
+       VARITEM(4, 4, XPD(s1, s2, s3, s4, f1, f2, f3, f4))
+
+void Dump_Notifications(float fh, float alsoprint);
+void Local_Notification(float net_type, float net_name, ...count);
+void Local_Notification_WOVA(float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
+
+#ifdef CSQC // CLIENT ONLY
+void Read_Notification(float is_new);
+#endif
+
+#ifdef SVQC // SERVER ONLY
+#define NOTIF_ONE 1
+#define NOTIF_ONE_ONLY 2
+#define NOTIF_TEAM 3
+#define NOTIF_TEAM_EXCEPT 4
+#define NOTIF_ANY 5
+#define NOTIF_ANY_EXCEPT 6
+
+#define IFSTR(num) ((num < notif.nent_stringcount) ? ...(num, string) : "")
+#define IFFL(num) ((((notif.nent_stringcount-1) + num) < count) ? ...(((notif.nent_stringcount-1) + num), float) : 0)
+
+void Send_Notification(float broadcast, entity client, float net_type, float net_name, ...count);
+void Send_Notification_WOVA(float broadcast, entity client, float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
+void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num);
+#define Send_CSQC_Centerprint_Generic_Expire(e,id) Send_CSQC_Centerprint_Generic(e, id, "", 1, 0)
+#endif
+
+
+// ====================================
+//  Notifications List and Information
+// ====================================
+/*
+ List of all notifications (including identifiers and display information)
+ Possible Tokens: default, name, infoname, centername, strnum, flnum, args, hudargs, icon, cpid, durcnt, normal, gentle
+ Format Specifications:
+    MSG_INFO:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled, 2 = also print to chat box
+      name: VAR: Name of notification
+      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
+      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
+      args: STRING: Arguments for Local_Notification_sprintf()
+      hudargs: STRING: Arguments for Local_Notification_HUD_Notify_Push()
+      icon: STRING: icon string name for the hud notify panel, "" if no icon is used
+      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
+      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
+    MSG_CENTER:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled
+      name: VAR: Name of notification
+      strnum: FLOAT: Number of STRING arguments (so that networking knows how many to send/receive)
+      flnum: FLOAT: Number of FLOAT arguments (so that networking knows how many to send/receive)
+      args: STRING: Arguments for Local_Notification_sprintf()
+      cpid: FLOAT: centerprint ID number (CPID_*), NO_CPID if no CPID is needed
+      durcnt: XPD(FLOAT, FLOAT): Duration/Countdown: extra arguments for centerprint messages
+      normal: STRING: Normal message (string for sprintf when gentle messages are NOT enabled)
+      gentle: STRING: Gentle message (string for sprintf when gentle messages ARE enabled)
+    MSG_WEAPON:
+    MSG_DEATH:
+      default: FLOAT: Default setting for whether the notification is enabled or not
+         ^-> 0 = disabled, 1 = enabled
+      name: VAR: Name of chaining notification
+      infoname: VAR: Name of info notification for reference
+      centername: VAR: Name of centerprint notification for reference
+
+ Messages with ^F1, ^BG, ^TC, etc etc in them will replace those strings
+ with colors according to the cvars the user has chosen. This allows for
+ users to create unique color profiles for their HUD, giving more customization
+ options to HUD designers and end users who want such a feature.
+
+ Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
+ string TCR(...) to better understand how these code replacements work.
+ Additionally, you can find all the definitions and explanations for
+ the argument values and what they return down below in this file.
+
+ Guidlines for notification declaration (please try and follow these):
+  Specific rules:
+    -ALWAYS start the string with a color, preferably background.
+    -ALWAYS reset a color after a name (this way they don't set it for the whole string).
+    -NEVER re-declare an event twice.
+    -NEVER add or remove tokens from the format, it SHOULD already work.
+    -MSG_INFO messages must ALWAYS end with a new line: \n
+    -MSG_INFO hudargs must always be ATTACKER -> VICTIM
+    -MSG_CENTER should NOT end with a new line
+
+ General rules:
+    -Be clean and simple with your notification naming,
+     nothing too long for the name field... Abbreviations are your friend. :D
+    -Keep the spacing as clean as possible... if the arguments are abnormally long,
+      it's okay to go out of line a bit... but try and keep it clean still.
+    -Sort the notifications in the most appropriate order for their tasks.
+    -ARIRE unir frk jvgu lbhe bja zbgure. (gvc sbe zvxrrhfn) -- Don't pay attention to this ^_^
+
+ Final note: DO NOT PROVIDE MORE ARGUMENTS THAN NECESSARY FOR THE NOTIFICATION YOU'RE CALLING!
+      The system is designed to save as much networking bandwidth as possible,
+      so please dynamically control your argument sending to fit *exactly* what is required.
+      If you send a notification with mismatching arguments, Send_Notification() will error.
+*/
+
+#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(STR_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(STR_TEAM_1))) \
+       MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(STR_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(STR_TEAM_2))) \
+       #if teams >= 3 \
+               MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(STR_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(STR_TEAM_3))) \
+       #endif \
+       #if teams >= 4 \
+               MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
+       #endif
+#define MSG_INFO_NOTIFICATIONS \
+       /*MSG_INFO_NOTIF(1, INFO_EMPTY,                                                 0, 0, "", "",                                                   "",                                             "", "")*/ \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DROPPED_, 2,              0, 0, "", "",                                                   "",                                             _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_DAMAGED_, 2,              0, 0, "", "",                                                   "",                                             _("^BGThe ^TC^TT^BG flag was destroyed and returned to base\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_SPEEDRUN_, 2,             0, 1, "f1p2dec", "",                                    "",                                             _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_NEEDKILL_, 2,             0, 0, "", "",                                                   "",                                             _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 2,             0, 0, "", "",                                                   "",                                             _("^BGThe ^TC^TT^BG flag was returned to base by its owner\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 2,              0, 0, "", "",                                                   "",                                             _("^BGThe ^TC^TT^BG flag has returned to the base\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 2,                                  1, 0, "s1", "s1",                                               "notify_%s_taken",              _("^BG%s^BG got the ^TC^TT^BG flag\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_RETURN_, 2,                                  1, 0, "s1", "s1",                                               "notify_%s_returned",   _("^BG%s^BG returned the ^TC^TT^BG flag\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_LOST_, 2,                                    1, 0, "s1", "s1",                                               "notify_%s_lost",               _("^BG%s^BG lost the ^TC^TT^BG flag\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2,                                 1, 0, "s1", "s1",                                               "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 2,                    1, 1, "s1 f1p2dec", "s1",                               "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 2,                  2, 2, "s1 f1p2dec s2 f2p2dec", "s1",    "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds\n"), "") \
+       MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 2,                2, 2, "s1 f1p2dec s2 f2p2dec", "s1",    "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds\n"), "") \
+       MULTITEAM_INFO(1, INFO_DEATH_TEAMKILL_, 4,                              3, 1, "s1 s2 s3loc spree_end", "s2 s1", "notify_teamkill_%s",   _("^BG%s^K1 was betrayed by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CUSTOM,                               3, 1, "s1 s2 s3loc spree_lost", "s1",   "notify_void",                  _("^BG%s^K1 %s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC,                              2, 1, "s1 s2loc spree_lost", "s1",              "notify_selfkill",              _("^BG%s^K1 died%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VOID,                                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_void",                  _("^BG%s^K1 was in the wrong place%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SUICIDE,                              2, 1, "s1 s2loc spree_lost", "s1",              "notify_selfkill",              _("^BG%s^K1 couldn't take it anymore%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NOAMMO,                               2, 1, "s1 s2loc spree_lost", "s1",              "notify_outofammo",             _("^BG%s^K1 died%s%s. What's the point of living without ammo?\n"), _("^BG%s^K1 ran out of ammo%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_ROT,                                  2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 rotted away%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CAMP,                                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_camping",               _("^BG%s^K1 thought they found a nice camping ground%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_BETRAYAL,                             2, 1, "s1 s2loc spree_lost", "s1",              "notify_teamkill_red",  _("^BG%s^K1 became enemies with the Lord of Teamplay%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TEAMCHANGE,                   2, 1, "s1 s2loc death_team", "",                "",                                             _("^BG%s^K1 switched to the %s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_AUTOTEAMCHANGE,               2, 1, "s1 s2loc death_team", "",                "",                                             _("^BG%s^K1 was moved into the %s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FALL,                                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_fall",                  _("^BG%s^K1 hit the ground with a crunch%s%s\n"), _("^BG%s^K1 hit the ground with a bit too much force%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_DROWN,                                2, 1, "s1 s2loc spree_lost", "s1",              "notify_water",                 _("^BG%s^K1 couldn't catch their breath%s%s\n"), _("^BG%s^K1 was in the water for too long%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FIRE,                                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 became a bit too crispy%s%s\n"), _("^BG%s^K1 felt a little hot%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_LAVA,                                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_lava",                  _("^BG%s^K1 turned into hot slag%s%s\n"), _("^BG%s^K1 found a hot place%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SLIME,                                2, 1, "s1 s2loc spree_lost", "s1",              "notify_slime",                 _("^BG%s^K1 was slimed%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SHOOTING_STAR,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_shootingstar",  _("^BG%s^K1 became a shooting star%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SWAMP,                                2, 1, "s1 s2loc spree_lost", "s1",              "notify_slime",                 _("^BG%s^K1 is now preserved for centuries to come%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_CHEAT,                                2, 1, "s1 s2loc spree_lost", "s1",              "notify_selfkill",              _("^BG%s^K1 unfairly eliminated themself%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TOUCHEXPLODE,                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 died in an accident%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET,                               2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 ran into a turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_EWHEEL,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was blasted away by an eWheel turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_FLAC,                  2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got caught up in the FLAC turret fire%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MACHINEGUN,    2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was riddled full of holes by a Machinegun turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_GUN,              2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got served a lead enrichment by a Walker turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_MEELE,    2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was impaled by a Walker turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_WALK_ROCKET,   2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was blasted away by a Walker turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HELLION,               2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was blasted away by a Hellion turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_HK,                    2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 could not hide from the Hunter turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_MLRS,                  2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got turned into smoldering gibs by an MLRS turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PLASMA,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got served some superheated plasma from a turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_PHASER,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was phased out by a turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_TURRET_TESLA,                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was electrocuted by a Tesla turret%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_CRUSH,                             2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was crushed by a vehicle%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_ROCKET,               2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was blasted to bits by a Spiderbot rocket%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_SPID_DEATH,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got caught in the blast of a Spiderbot explosion%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_ROCKET,               2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 couldn't find shelter from a Racer rocket%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_WAKI_DEATH,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got caught in the blast of a Racer explosion%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_BOMB,                 2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 was caught in a Raptor cluster bomb%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_RAPT_DEATH,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got caught in the blast of a Raptor explosion%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_VH_BUMB_DEATH,                2, 1, "s1 s2loc spree_lost", "s1",              "notify_death",                 _("^BG%s^K1 got caught in the blast of a Bumblebee explosion%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TELEFRAG,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_telefrag",              _("^BG%s%s^K1 was telefragged by ^BG%s^K1%s%s\n"), _("^BG%s^K1 tried to occupy ^BG%s^K1's teleport destination space%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FALL,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_fall",                  _("^BG%s%s^K1 was grounded by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_DROWN,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_water",                 _("^BG%s%s^K1 was drowned by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_lava",                  _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_slime",                 _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_shootingstar",  _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SWAMP,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_slime",                 _("^BG%s%s^K1 was preserved by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VOID,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_void",                  _("^BG%s%s^K1 was thrown into a world of hurt by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_TOUCHEXPLODE,               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 died in an accident with ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_CHEAT,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was unfairly eliminated by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s\n"), _("^BG%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s\n")) \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_CRUSH,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was crushed by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_MINIGUN,    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 got shredded by ^BG%s^K1's Spiderbot%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_ROCKET,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was blasted to bits by ^BG%s^K1's Spiderbot%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_SPID_DEATH,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Spiderbot exploded%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_GUN,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was bolted down by ^BG%s^K1's Racer%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_ROCKET,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 couldn't find shelter from ^BG%s^K1's Racer%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_WAKI_DEATH,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Racer exploded%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_CANNON,             3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 couldn't resist ^BG%s^K1's purple blobs%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_BOMB,               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 was cluster bombed by ^BG%s^K1's Raptor%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_RAPT_DEATH,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Raptor exploded%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_GUN,                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 saw the pretty lights of ^BG%s^K1's Bumblebee gun%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_VH_BUMB_DEATH,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",                 _("^BG%s%s^K1 got caught in the blast when ^BG%s^K1's Bumblebee exploded%s%s\n"), "") \
+       MULTITEAM_INFO(1, INFO_FREEZETAG_ROUND_WIN_, 4,                 0, 0, "", "",                                                   "",                                             _("^TC^TT^BG team wins the round, all other teams were frozen\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVE,                                2, 0, "s1 s2", "",                                              "",                                             _("^BG%s^K3 was revived by ^BG%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_FREEZETAG_FREEZE,                                2, 0, "s1 s2", "",                                              "",                                             _("^BG%s^K1 was frozen by ^BG%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_FREEZETAG_SELF,                                  1, 0, "s1", "",                                                 "",                                             _("^BG%s^K1 froze themself\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_GODMODE_OFF,                                             0, 1, "f1", "",                                                 "",                                             _("^BGGodmode saved you %s units of damage, cheater!\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_JOIN_CONNECT,                                    1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 connected%s\n"), "") \
+       MULTITEAM_INFO(2, INFO_JOIN_CONNECT_TEAM_, 4,                   1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 connected and joined the ^TC^TT\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_JOIN_PLAY,                                               1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 is now playing\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_KEEPAWAY_DROPPED,                                1, 0, "s1", "s1",                                               "notify_balldropped",   _("^BG%s^BG has dropped the ball!\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_KEEPAWAY_PICKUP,                                 1, 0, "s1", "s1",                                               "notify_ballpickedup",  _("^BG%s^BG has picked up the ball!\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES,                                             1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 has no more lives left\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT,                                             1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 forfeited\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY,                    1, 0, "s1", "s1",                                               "strength",                             _("^BG%s^K1 picked up Invisibility\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_POWERUP_SHIELD,                                  1, 0, "s1", "s1",                                               "shield",                               _("^BG%s^K1 picked up Shield\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_POWERUP_SPEED,                                   1, 0, "s1", "s1",                                               "shield",                               _("^BG%s^K1 picked up Speed\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_POWERUP_STRENGTH,                                1, 0, "s1", "s1",                                               "strength",                             _("^BG%s^K1 picked up Strength\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_QUIT_DISCONNECT,                                 1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 disconnected\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_QUIT_KICK_IDLING,                                1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 was kicked for idling\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_QUIT_KICK_SPECTATING,                    0, 0, "", "",                                                   "",                                             _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment.\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_QUIT_SPECTATE,                                   1, 0, "s1", "",                                                 "",                                             _("^BG%s^F3 is now spectating\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_RACE_FAIL_RANKED,                                1, 3, "s1 f1ord race_time race_diff", "s1",             "race_newfail", _("^BG%s^BG couldn't break their %s place record of %s %s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_RACE_FAIL_UNRANKED,                              1, 3, "s1 f1ord race_time race_diff", "s1",             "race_newfail", _("^BG%s^BG couldn't break the %s place record of %s %s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_RACE_NEW_RECORD,                                 2, 0, "s1 s2", "s1",                                    "race_newrecordserver", "TODO\n", "") \
+       MSG_INFO_NOTIF(1, INFO_RACE_NEW_TIME,                                   2, 0, "s1 s2", "s1",                                    "race_newtime",                 "TODO\n", "") \
+       MSG_INFO_NOTIF(1, INFO_RACE_NEW_RANK,                                   2, 0, "s1 s2", "s1",                                    "race_newrankyellow",   "TODO\n", "") \
+       MULTITEAM_INFO(1, INFO_SCORES_, 4,                                              0, 0, "", "",                                                   "",                                             _("^TC^TT ^BGteam scores!\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_SPECTATE_WARNING,                                0, 1, "f1", "",                                                 "",                                             _("^F2You have to become a player within the next %s seconds, otherwise you will be kicked, because spectating isn't allowed at this time!\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_SUPERWEAPON_PICKUP,                              0, 0, "s1", "s1",                                               "strength",                             _("^BG%s^K1 picked up a Superweapon\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_VERSION_BETA,                                    2, 0, "s1 s2", "",                                              "",                                             _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_VERSION_OLD,                                             2, 0, "s1 s2", "",                                              "",                                             _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s\n"), "") \
+       MSG_INFO_NOTIF(2, INFO_VERSION_OUTDATED,                                2, 0, "s1 s2", "",                                              "",                                             _("^F4NOTE: ^F1Xonotic %s^BG is out, and you still have ^F2Xonotic %s^BG - get the update from ^F3http://www.xonotic.org/^BG!\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WATERMARK,                                               1, 0, "s1", "",                                                 "",                                             _("^F3SVQC Build information: ^F4%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_THINKING_WITH_PORTALS,                    2, 1, "s1 s2loc spree_lost", "s1",                                      "notify_selfkill",                      _("^BG%s^K1 is now thinking with portals%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_SUICIDE,                                  2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponcrylink",                        _("^BG%s^K1 felt the strong pull of their Crylink%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_CRYLINK_MURDER,                                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponcrylink",                        _("^BG%s%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_ORBS,                     2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponelectro",                        _("^BG%s^K1 could not remember where they put their Electro plasma%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_SUICIDE_BOLT,                     2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponelectro",                        _("^BG%s^K1 played with Electro plasma%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_BOLT,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponelectro",                        _("^BG%s%s^K1 was blasted by ^BG%s^K1's Electro bolt%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_ORBS,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponelectro",                        _("^BG%s%s^K1 got too close to ^BG%s^K1's Electro plasma%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ELECTRO_MURDER_COMBO,                     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponelectro",                        _("^BG%s%s^K1 felt the electrifying air of ^BG%s^K1's Electro combo%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,                2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponfireball",                       _("^BG%s^K1 forgot about their firemine%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_SUICIDE_BLAST,                   2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponfireball",                       _("^BG%s^K1 should have used a smaller gun%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_FIREMINE,                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponfireball",                       _("^BG%s%s^K1 got burnt by ^BG%s^K1's firemine%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_FIREBALL_MURDER_BLAST,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponfireball",                       _("^BG%s%s^K1 got too close to ^BG%s^K1's fireball%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,                   2, 1, "s1 s2loc spree_lost", "s1",                                      "weapongrenadelauncher",        _("^BG%s^K1 blew themself up with their own Mortar%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,                    2, 1, "s1 s2loc spree_lost", "s1",                                      "weapongrenadelauncher",        _("^BG%s^K1 didn't see their own Mortar grenade%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_EXPLODE,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weapongrenadelauncher",        _("^BG%s%s^K1 ate ^BG%s^K1's Mortar grenade%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_BOUNCE,                     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weapongrenadelauncher",        _("^BG%s%s^K1 got too close to ^BG%s^K1's Mortar grenade%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_SUICIDE,                                    2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponhagar",                          _("^BG%s^K1 played with tiny Hagar rockets%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_BURST,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponhagar",                          _("^BG%s%s^K1 was pummeled by a burst of ^BG%s^K1's Hagar rockets%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HAGAR_MURDER_SPRAY,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponhagar",                          _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Hagar rockets%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_SUICIDE,                                     2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponhlac",                           _("^BG%s^K1 got a little jumpy with their HLAC%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HLAC_MURDER,                                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponhlac",                           _("^BG%s%s^K1 was cut down with ^BG%s^K1's HLAC%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_HOOK_MURDER,                                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponhook",                           _("^BG%s%s^K1 was caught in ^BG%s^K1's Hook gravity bomb%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_LASER_SUICIDE,                                    2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponlaser",                          _("^BG%s^K1 shot themself to hell with their Laser%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_LASER_MURDER,                                     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponlaser",                          _("^BG%s%s^K1 was shot to death by ^BG%s^K1's Laser%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_SUICIDE,                                2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponminelayer",                      _("^BG%s^K1 forgot about their mine%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_MURDER,                                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponminelayer",                      _("^BG%s%s^K1 got too close to ^BG%s^K1's mine%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_MINSTANEX_MURDER,                                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponminstanex",                      _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Minstanex%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_NEX_MURDER,                                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponnex",                            _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Nex%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrifle",                          _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle bullet hail%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HAIL,                                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrifle",                          _("^BG%s%s^K1 died in ^BG%s^K1's Rifle bullet hail%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_PIERCING,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrifle",                          _("^BG%s%s^K1 failed to hide from ^BG%s^K1's Rifle%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER,                                     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrifle",                          _("^BG%s%s^K1 was sniped with a Rifle by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_RIFLE_MURDER_HEADSHOT,                    3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "notify_headshot",                      _("^BG%s%s^K1 was shot in the head with a Rifle by ^BG%s^K1%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ROCKETLAUNCHER_SUICIDE,                   2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponrocketlauncher",         _("^BG%s^K1 blew themself up with their Rocketlauncher%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrocketlauncher",         _("^BG%s%s^K1 ate ^BG%s^K1's rocket%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,     3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponrocketlauncher",         _("^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_SUICIDE,                                   2, 1, "s1 s2loc spree_lost", "s1",                                      "weaponseeker",                         _("^BG%s^K1 played with tiny Seeker rockets%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_TAG,                                3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponseeker",                         _("^BG%s%s^K1 was tagged by ^BG%s^K1's Seeker%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_MURDER_SPRAY,                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponseeker",                         _("^BG%s%s^K1 was pummeled by ^BG%s^K1's Seeker rockets%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER_SLAP,                              3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1",       "notify_melee_shotgun",         _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shotgun%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER,                                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponshotgun",                        _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE,                                     2, 1, "s1 s2loc spree_lost", "s1",                                      "weapontuba",                           _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER,                                              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weapontuba",                           _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_SUICIDE,                                2, 1, "s1 s2loc spree_lost", "s1",                                      "weapontuba",                           _("^BG%s^K1 hurt their own ears with the @!#%%'n Accordeon%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_ACCORDEON_MURDER,                                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weapontuba",                           _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Accordeon%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_SUICIDE,                              2, 1, "s1 s2loc spree_lost", "s1",                                      "weapontuba",                           _("^BG%s^K1 hurt their own ears with the @!#%%'n Klein Bottle%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_KLEINBOTTLE_MURDER,                               3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weapontuba",                           _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Klein Bottle%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE,                                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponuzi",                            _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY,                                 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",       "weaponuzi",                            _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s\n"), "") 
+
+#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(STR_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(STR_TEAM_1))) \
+       MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(STR_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(STR_TEAM_2))) \
+       #if teams >= 3 \
+               MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(STR_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(STR_TEAM_3))) \
+       #endif \
+       #if teams >= 4 \
+               MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
+       #endif
+#define MSG_CENTER_NOTIFICATIONS \
+       /*MSG_CENTER_NOTIF(1, CENTER_EMPTY,                                                     0, 0, "",                               NO_CPID,                                "0 0", "null", "")*/ \
+       MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,                           0, 0, "",                               CPID_ASSAULT_ROLE,              "0 0", _("^BGYou are attacking!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,                           0, 0, "",                               CPID_ASSAULT_ROLE,              "0 0", _("^BGYou are defending!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED,          0, 0, "",                               CPID_CTF_CAPSHIELD,             "0 0", _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE,                      0, 0, "",                               CPID_CTF_CAPSHIELD,             "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 2,                          2, 0, "s1 s2",                  CPID_CTF_PASS,                  "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_PASS_SENT_, 2,                           1, 0, "s1",                     CPID_CTF_PASS,                  "0 0", _("^BGYou passed the ^TC^TT^BG flag to %s"), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_PASS_RECEIVED_, 2,                       1, 0, "s1",                     CPID_CTF_PASS,                  "0 0", _("^BGYou received the ^TC^TT^BG flag from %s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTING,                         1, 0, "s1",                             CPID_CTF_PASS,                  "0 0", _("^BGRequesting %s^BG to pass you the flag"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PASS_REQUESTED,                          1, 0, "s1 pass_key",    CPID_CTF_PASS,                  "0 0", _("^BG%s^BG requests you to pass the flag%s"), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_RETURN_, 2,                                      0, 0, "",                               CPID_CTF_LOWPRIO,               "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 2,                                     0, 0, "",                               CPID_CTF_LOWPRIO,               "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "") \
+       MULTITEAM_CENTER(1, CENTER_CTF_PICKUP_, 2,                                      0, 0, "",                               CPID_CTF_LOWPRIO,               "0 0", _("^BGYou got the ^TC^TT^BG flag!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM,                                     1, 0, "s1",                             CPID_CTF_LOWPRIO,               "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_TEAM_VERBOSE,                     2, 0, "s1 s2 s1",               CPID_CTF_LOWPRIO,               "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY,                            1, 0, "s1",                             CPID_CTF_LOWPRIO,               "0 0", _("^BGThe %senemy^BG got your flag! Retrieve it!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_PICKUP_ENEMY_VERBOSE,            2, 0, "s1 s2 s1",               CPID_CTF_LOWPRIO,               "0 0", _("^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_CARRIER,                       0, 0, "",                               CPID_STALEMATE,                 "0 0", _("^BGStalemate! Enemies can now see you on radar!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_STALEMATE_OTHER,                         0, 0, "",                               CPID_STALEMATE,                 "0 0", _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_CTF_FLAG_THROW_PUNISH,                       0, 1, "f1secs",                 CPID_CTF_LOWPRIO,               "0 0", _("^BGToo many flag throws! Throwing disabled for %s."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CUSTOM,                           2, 0, "s2",                             NO_CPID,                                "0 0", _("^K1You were %s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_GENERIC,                          0, 0, "",                               NO_CPID,                                "0 0", _("^K1You killed your own dumb self!"), _("^K1You need to be more careful!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VOID,                                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1Watch your step!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SUICIDE,                          0, 0, "",                               NO_CPID,                                "0 0", _("^K1You committed suicide!"), _("^K1You ended it all!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NOAMMO,                           0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were killed for running out of ammo..."), _("^K1You are respawning for running out of ammo...")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_ROT,                                      0, 0, "",                               NO_CPID,                                "0 0", _("^K1You grew too old without taking your medicine"), _("^K1You need to preserve your health")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CAMP,                                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1Die camper!"), _("^K1Reconsider your tactics, camper!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_BETRAYAL,                         0, 0, "",                               NO_CPID,                                "0 0", _("^K1Don't shoot your team mates!"), _("^K1Don't go against your team mates!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TEAMCHANGE,                       0, 1, "death_team",             NO_CPID,                                "0 0", _("^BGYou are now on: %s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_AUTOTEAMCHANGE,           0, 1, "death_team",             NO_CPID,                                "0 0", _("^BGYou have been moved into a different team\nYou are now on: %s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FALL,                                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1You hit the ground with a crunch!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_DROWN,                            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You couldn't catch your breath!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FIRE,                                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got a little bit too crispy!"), _("^K1You felt a little too hot!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_LAVA,                                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1You couldn't stand the heat!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SLIME,                            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You melted away in slime!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SHOOTING_STAR,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You became a shooting star!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SWAMP,                            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got stuck in a swamp!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CHEAT,                            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You unfairly eliminated yourself!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TOUCHEXPLODE,                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1You died in an accident!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET,                           0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were fragged by a turret!"), _("^K1You had an unfortunate run in with a turret!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_EWHEEL,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were fragged by an eWheel turret!"), _("^K1You had an unfortunate run in with an eWheel turret!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_TURRET_WALK,                      0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were fragged by a Walker turret!"), _("^K1You had an unfortunate run in with a Walker turret!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_CRUSH,                         0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were crushed by a vehicle!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_ROCKET,           0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were blasted to bits by a Spiderbot rocket!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_SPID_DEATH,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got caught in the blast of a Spiderbot explosion!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_ROCKET,           0, 0, "",                               NO_CPID,                                "0 0", _("^K1You couldn't find shelter from a Racer rocket!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_WAKI_DEATH,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got caught in the blast of a Racer explosion!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_BOMB,                     0, 0, "",                               NO_CPID,                                "0 0", _("^K1You were caught in a Raptor cluster bomb!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_RAPT_DEATH,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got caught in the blast of a Raptor explosion!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_VH_BUMB_DEATH,            0, 0, "",                               NO_CPID,                                "0 0", _("^K1You got caught in the blast of a Bumblebee explosion!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG,                                   1, 1, "spree_cen s1",                           NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED,                                1, 1, "spree_cen s1",                           NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG,                               1, 1, "spree_cen s1",                           NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED,                    1, 1, "spree_cen s1",                           NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAG_VERBOSE,                   1, 2, "spree_cen s1 frag_ping",         NO_CPID, "0 0", _("^K3%sYou fragged ^BG%s^BG%s"), _("^K3%sYou scored against ^BG%s^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_FRAGGED_VERBOSE,                1, 4, "spree_cen s1 frag_stats",        NO_CPID, "0 0", _("^K1%sYou were fragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE,               1, 2, "spree_cen s1 frag_ping",         NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE,    1, 4, "spree_cen s1 frag_stats",        NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing^BG%s")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAG,                                 1, 0, "s1",                                                     NO_CPID, "0 0", _("^K1Moron! You fragged ^BG%s^K1, a team mate!"), _("^K1Moron! You went against ^BG%s^K1, a team mate!")) \
+       MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAGGED,                              1, 0, "s1",                                                     NO_CPID, "0 0", _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate")) \
+       MSG_CENTER_NOTIF(1, CENTER_DISCONNECT_IDLING,                           0, 1, "",                               CPID_IDLING,                    "1 f1", _("^K1Stop idling!\n^BGDisconnecting in ^COUNT..."), "") \
+       MULTITEAM_CENTER(1, CENTER_FREEZETAG_ROUND_WIN_, 4,                     0, 0, "",                               NO_CPID,                                "0 0", _("^TC^TT^BG team wins the round, all other teams were frozen"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SPAWN_LATE,                        0, 0, "",                               NO_CPID,                                "0 0", _("^K1You spawned after the round started, you'll spawn as frozen"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE,                            1, 0, "s1",                             NO_CPID,                                "0 0", _("^K3You revived ^BG%s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVED,                           1, 0, "s1",                             NO_CPID,                                "0 0", _("^K3You were revived by ^BG%s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_SELF,                                      0, 0, "",                               NO_CPID,                                "0 0", _("^K1You froze yourself"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FREEZE,                            1, 0, "s1",                             NO_CPID,                                "0 0", _("^K3You froze ^BG%s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FROZEN,                            1, 0, "s1",                             NO_CPID,                                "0 0", _("^K1You were frozen by ^BG%s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_DROPPED,                            1, 0, "s1",                     CPID_KEEPAWAY,                  "0 0", _("^BG%s^BG has dropped the ball!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP,                                     1, 0, "s1",                     CPID_KEEPAWAY,                  "0 0", _("^BG%s^BG has picked up the ball!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN,                                       0, 0, "",                               CPID_KA_WARN,                   "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_LMS_CAMPCHECK,                                       0, 0, "",                               CPID_LMS_CAMP,                  "0 0", _("^K1Don't camp!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_JOIN_NOSPAWNS,                                       0, 0, "",                               CPID_PREVENT_JOIN,              "0 0", _("^K1No spawnpoints available!\nHope your team can fix it..."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT,                                        0, 0, "",                               CPID_PREVENT_JOIN,              "0 0", _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME,                                       0, 1, "f1time",                 CPID_OVERTIME,                  "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nAdded ^F4%s ^F2minute(s) to the game!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_OVERTIME_FRAG,                                       0, 0, "",                               CPID_OVERTIME,                  "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nKeep fragging until we have a winner!"), _("^F2Now playing ^F4OVERTIME^F2!\nKeep scoring until we have a winner!")) \
+       MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_INVISIBILITY,                      0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Invisibility has worn off"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SHIELD,                            0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Shield has worn off"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SPEED,                                     0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Speed has worn off"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_STRENGTH,                          0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Strength has worn off"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERUP_INVISIBILITY,                        0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2You are invisible"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERUP_SHIELD,                                      0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Shield surrounds you"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERUP_SPEED,                                       0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2You are on speed"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_POWERUP_STRENGTH,                            0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Strength infuses your weapons with devastating power"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_RACE_FINISHLAP,                                      0, 0, "",                               CPID_RACE_FINISHLAP,    "0 0", _("^F2The race is over, finish your lap!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_BROKEN,                          0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Superweapons have broken down"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_PICKUP,                          0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2You now have a superweapon"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_LOST,                            0, 0, "",                               CPID_POWERUP,                   "0 0", _("^F2Superweapons have been lost"), "") \
+       MULTITEAM_CENTER(1, CENTER_TEAMCHANGE_, 4,                                      0, 1, "",                               CPID_TEAMCHANGE,                "1 f1", _("^BGChanging to ^TC^TT^BG in ^COUNT"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE,                         0, 1, "",                               CPID_TEAMCHANGE,                "1 f1", _("^BGSpectating in ^COUNT"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_AUTO,                                     0, 1, "",                               CPID_TEAMCHANGE,                "1 f1", _("^BGChanging team in ^COUNT"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE,                          0, 1, "",                               CPID_TEAMCHANGE,                "1 f1", _("^K1Suicide in ^COUNT"), "")
+
+#define MSG_WEAPON_NOTIFICATIONS \
+       /*MSG_WEAPON_NOTIF(1, WEAPON_EMPTY,                                                     NO_MSG,                                                                         NO_MSG)*/ \
+       MSG_WEAPON_NOTIF(1, WEAPON_THINKING_WITH_PORTALS,                       INFO_WEAPON_THINKING_WITH_PORTALS,                      CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_CRYLINK_SUICIDE,                             INFO_WEAPON_CRYLINK_SUICIDE,                            CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_CRYLINK_MURDER,                                      INFO_WEAPON_CRYLINK_MURDER,                             NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ELECTRO_SUICIDE_ORBS,                        INFO_WEAPON_ELECTRO_SUICIDE_ORBS,                       CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ELECTRO_SUICIDE_BOLT,                        INFO_WEAPON_ELECTRO_SUICIDE_BOLT,                       CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ELECTRO_MURDER_BOLT,                         INFO_WEAPON_ELECTRO_MURDER_BOLT,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ELECTRO_MURDER_ORBS,                         INFO_WEAPON_ELECTRO_MURDER_ORBS,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ELECTRO_MURDER_COMBO,                        INFO_WEAPON_ELECTRO_MURDER_COMBO,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_FIREBALL_SUICIDE_FIREMINE,           INFO_WEAPON_FIREBALL_SUICIDE_FIREMINE,          CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_FIREBALL_SUICIDE_BLAST,                      INFO_WEAPON_FIREBALL_SUICIDE_BLAST,             CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_FIREBALL_MURDER_FIREMINE,            INFO_WEAPON_FIREBALL_MURDER_FIREMINE,           NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_FIREBALL_MURDER_BLAST,                       INFO_WEAPON_FIREBALL_MURDER_BLAST,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MORTAR_SUICIDE_EXPLODE,                      INFO_WEAPON_MORTAR_SUICIDE_EXPLODE,             CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MORTAR_SUICIDE_BOUNCE,                       INFO_WEAPON_MORTAR_SUICIDE_BOUNCE,                      CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MORTAR_MURDER_EXPLODE,                       INFO_WEAPON_MORTAR_MURDER_EXPLODE,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MORTAR_MURDER_BOUNCE,                        INFO_WEAPON_MORTAR_MURDER_BOUNCE,                       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HAGAR_SUICIDE,                                       INFO_WEAPON_HAGAR_SUICIDE,                                      CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HAGAR_MURDER_BURST,                          INFO_WEAPON_HAGAR_MURDER_BURST,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HAGAR_MURDER_SPRAY,                          INFO_WEAPON_HAGAR_MURDER_SPRAY,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HLAC_SUICIDE,                                        INFO_WEAPON_HLAC_SUICIDE,                                       CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HLAC_MURDER,                                         INFO_WEAPON_HLAC_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_HOOK_MURDER,                                         INFO_WEAPON_HOOK_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_LASER_SUICIDE,                                       INFO_WEAPON_LASER_SUICIDE,                                      CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_LASER_MURDER,                                        INFO_WEAPON_LASER_MURDER,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MINELAYER_SUICIDE,                           INFO_WEAPON_MINELAYER_SUICIDE,                          CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MINELAYER_MURDER,                            INFO_WEAPON_MINELAYER_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_MINSTANEX_MURDER,                            INFO_WEAPON_MINSTANEX_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_NEX_MURDER,                                          INFO_WEAPON_NEX_MURDER,                                         NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL_PIERCING,          INFO_WEAPON_RIFLE_MURDER_HAIL_PIERCING,         NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_RIFLE_MURDER_HAIL,                           INFO_WEAPON_RIFLE_MURDER_HAIL,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_RIFLE_MURDER_PIERCING,                       INFO_WEAPON_RIFLE_MURDER_PIERCING,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_RIFLE_MURDER,                                        INFO_WEAPON_RIFLE_MURDER,                                       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_RIFLE_MURDER_HEADSHOT,                       INFO_WEAPON_RIFLE_MURDER_HEADSHOT,                      NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ROCKETLAUNCHER_SUICIDE,                      INFO_WEAPON_ROCKETLAUNCHER_SUICIDE,             CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,        INFO_WEAPON_ROCKETLAUNCHER_MURDER_DIRECT,       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,        INFO_WEAPON_ROCKETLAUNCHER_MURDER_SPLASH,       NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_SEEKER_SUICIDE,                                      INFO_WEAPON_SEEKER_SUICIDE,                             CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_SEEKER_MURDER_TAG,                           INFO_WEAPON_SEEKER_MURDER_TAG,                          NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_SEEKER_MURDER_SPRAY,                         INFO_WEAPON_SEEKER_MURDER_SPRAY,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_SHOTGUN_MURDER_SLAP,                         INFO_WEAPON_SHOTGUN_MURDER_SLAP,                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_SHOTGUN_MURDER,                                      INFO_WEAPON_SHOTGUN_MURDER,                             NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_TUBA_SUICIDE,                                        INFO_WEAPON_TUBA_SUICIDE,                                       CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_TUBA_MURDER,                                         INFO_WEAPON_TUBA_MURDER,                                        NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ACCORDEON_SUICIDE,                           INFO_WEAPON_ACCORDEON_SUICIDE,                          CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_ACCORDEON_MURDER,                            INFO_WEAPON_ACCORDEON_MURDER,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_KLEINBOTTLE_SUICIDE,                         INFO_WEAPON_KLEINBOTTLE_SUICIDE,                        CENTER_DEATH_SELF_GENERIC) \
+       MSG_WEAPON_NOTIF(1, WEAPON_KLEINBOTTLE_MURDER,                          INFO_WEAPON_KLEINBOTTLE_MURDER,                         NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_UZI_MURDER_SNIPE,                            INFO_WEAPON_UZI_MURDER_SNIPE,                           NO_MSG) \
+       MSG_WEAPON_NOTIF(1, WEAPON_UZI_MURDER_SPRAY,                            INFO_WEAPON_UZI_MURDER_SPRAY,                           NO_MSG) 
+
+#define MSG_DEATH_NOTIFICATIONS \
+       /*MSG_DEATH_NOTIF(1, DEATH_EMPTY,                                               NO_MSG,                                                                 NO_MSG)*/ \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_CUSTOM,                                   INFO_DEATH_SELF_GENERIC,                                CENTER_DEATH_SELF_CUSTOM) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_GENERIC,                                  INFO_DEATH_SELF_GENERIC,                                CENTER_DEATH_SELF_GENERIC) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VOID,                                             INFO_DEATH_SELF_VOID,                                   CENTER_DEATH_SELF_VOID) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_SUICIDE,                                  INFO_DEATH_SELF_SUICIDE,                                CENTER_DEATH_SELF_SUICIDE) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_NOAMMO,                                   INFO_DEATH_SELF_NOAMMO,                                 CENTER_DEATH_SELF_NOAMMO) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_ROT,                                              INFO_DEATH_SELF_ROT,                                    CENTER_DEATH_SELF_ROT) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_CAMP,                                             INFO_DEATH_SELF_CAMP,                                   CENTER_DEATH_SELF_CAMP) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_BETRAYAL,                                 INFO_DEATH_SELF_BETRAYAL,                               CENTER_DEATH_SELF_BETRAYAL) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TEAMCHANGE,                               INFO_DEATH_SELF_TEAMCHANGE,                             CENTER_DEATH_SELF_TEAMCHANGE) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_AUTOTEAMCHANGE,                   INFO_DEATH_SELF_AUTOTEAMCHANGE,                 CENTER_DEATH_SELF_AUTOTEAMCHANGE) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_FALL,                                             INFO_DEATH_SELF_FALL,                                   CENTER_DEATH_SELF_FALL) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_DROWN,                                    INFO_DEATH_SELF_DROWN,                                  CENTER_DEATH_SELF_DROWN) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_FIRE,                                             INFO_DEATH_SELF_FIRE,                                   CENTER_DEATH_SELF_FIRE) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_LAVA,                                             INFO_DEATH_SELF_LAVA,                                   CENTER_DEATH_SELF_LAVA) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_SLIME,                                    INFO_DEATH_SELF_SLIME,                                  CENTER_DEATH_SELF_SLIME) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_SHOOTING_STAR,                    INFO_DEATH_SELF_SHOOTING_STAR,                  CENTER_DEATH_SELF_SHOOTING_STAR) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_SWAMP,                                    INFO_DEATH_SELF_SWAMP,                                  CENTER_DEATH_SELF_SWAMP) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_CHEAT,                                    INFO_DEATH_SELF_CHEAT,                                  CENTER_DEATH_SELF_CHEAT) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TOUCHEXPLODE,                             INFO_DEATH_SELF_TOUCHEXPLODE,                   CENTER_DEATH_SELF_TOUCHEXPLODE) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET,                                   INFO_DEATH_SELF_TURRET,                                 CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_EWHEEL,                    INFO_DEATH_SELF_TURRET_EWHEEL,                  CENTER_DEATH_SELF_TURRET_EWHEEL) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_FLAC,                              INFO_DEATH_SELF_TURRET_FLAC,                    CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_MACHINEGUN,                INFO_DEATH_SELF_TURRET_MACHINEGUN,              CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_WALK_GUN,                  INFO_DEATH_SELF_TURRET_WALK_GUN,                CENTER_DEATH_SELF_TURRET_WALK) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_WALK_MEELE,                INFO_DEATH_SELF_TURRET_WALK_MEELE,              CENTER_DEATH_SELF_TURRET_WALK) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_WALK_ROCKET,               INFO_DEATH_SELF_TURRET_WALK_ROCKET,             CENTER_DEATH_SELF_TURRET_WALK) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_HELLION,                   INFO_DEATH_SELF_TURRET_HELLION,                 CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_HK,                                INFO_DEATH_SELF_TURRET_HK,                              CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_MLRS,                              INFO_DEATH_SELF_TURRET_MLRS,                    CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_PLASMA,                    INFO_DEATH_SELF_TURRET_PLASMA,                  CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_PHASER,                    INFO_DEATH_SELF_TURRET_PHASER,                  CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_TURRET_TESLA,                             INFO_DEATH_SELF_TURRET_TESLA,                   CENTER_DEATH_SELF_TURRET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_CRUSH,                                 INFO_DEATH_SELF_VH_CRUSH,                               CENTER_DEATH_SELF_VH_CRUSH) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_SPID_ROCKET,                   INFO_DEATH_SELF_VH_SPID_ROCKET,                 CENTER_DEATH_SELF_VH_SPID_ROCKET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_SPID_DEATH,                    INFO_DEATH_SELF_VH_SPID_DEATH,                  CENTER_DEATH_SELF_VH_SPID_DEATH) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_WAKI_ROCKET,                   INFO_DEATH_SELF_VH_WAKI_ROCKET,                 CENTER_DEATH_SELF_VH_WAKI_ROCKET) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_WAKI_DEATH,                    INFO_DEATH_SELF_VH_WAKI_DEATH,                  CENTER_DEATH_SELF_VH_WAKI_DEATH) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_RAPT_BOMB,                             INFO_DEATH_SELF_VH_RAPT_BOMB,                   CENTER_DEATH_SELF_VH_RAPT_BOMB) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_RAPT_DEATH,                    INFO_DEATH_SELF_VH_RAPT_DEATH,                  CENTER_DEATH_SELF_VH_RAPT_DEATH) \
+       MSG_DEATH_NOTIF(1, DEATH_SELF_VH_BUMB_DEATH,                    INFO_DEATH_SELF_VH_BUMB_DEATH,                  CENTER_DEATH_SELF_VH_BUMB_DEATH) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_TELEFRAG,                               INFO_DEATH_MURDER_TELEFRAG,                             NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_FALL,                                   INFO_DEATH_MURDER_FALL,                                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_DROWN,                                  INFO_DEATH_MURDER_DROWN,                                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_LAVA,                                   INFO_DEATH_MURDER_LAVA,                                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_SLIME,                                  INFO_DEATH_MURDER_SLIME,                                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_SHOOTING_STAR,                  INFO_DEATH_MURDER_SHOOTING_STAR,                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_SWAMP,                                  INFO_DEATH_MURDER_SWAMP,                                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VOID,                                   INFO_DEATH_MURDER_VOID,                                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_TOUCHEXPLODE,                   INFO_DEATH_MURDER_TOUCHEXPLODE,                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_CHEAT,                                  INFO_DEATH_MURDER_CHEAT,                                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_FIRE,                                   INFO_DEATH_MURDER_FIRE,                                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_CRUSH,                               INFO_DEATH_MURDER_VH_CRUSH,                             NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_SPID_MINIGUN,                INFO_DEATH_MURDER_VH_SPID_MINIGUN,              NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_SPID_ROCKET,                 INFO_DEATH_MURDER_VH_SPID_ROCKET,               NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_SPID_DEATH,                  INFO_DEATH_MURDER_VH_SPID_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_WAKI_GUN,                    INFO_DEATH_MURDER_VH_WAKI_GUN,                  NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_WAKI_ROCKET,                 INFO_DEATH_MURDER_VH_WAKI_ROCKET,               NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_WAKI_DEATH,                  INFO_DEATH_MURDER_VH_WAKI_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_RAPT_CANNON,                 INFO_DEATH_MURDER_VH_RAPT_CANNON,               NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_RAPT_BOMB,                   INFO_DEATH_MURDER_VH_RAPT_BOMB,                 NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_RAPT_DEATH,                  INFO_DEATH_MURDER_VH_RAPT_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_BUMB_GUN,                    INFO_DEATH_MURDER_VH_BUMB_GUN,                  NO_MSG) \
+       MSG_DEATH_NOTIF(1, DEATH_MURDER_VH_BUMB_DEATH,                  INFO_DEATH_MURDER_VH_BUMB_DEATH,                NO_MSG) 
+
+
+// ===========================
+//  Special CVAR Declarations
+// ===========================
+
+// MAKE SURE THIS IS ALWAYS SYNCHRONIZED WITH THE DUMP
+// NOTIFICATIONS FUNCTION IN THE .QC FILE!
+
+#define NOTIF_ADD_AUTOCVAR(name,default) var float autocvar_notification_##name = default;
+
+var float autocvar_notification_show_location = FALSE;
+var string autocvar_notification_show_location_string = ""; //_(" at the %s");
+var float autocvar_notification_show_sprees = TRUE;
+var float autocvar_notification_show_sprees_info = 3; // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
+var float autocvar_notification_show_sprees_info_newline = FALSE;
+var float autocvar_notification_show_sprees_info_specialonly = TRUE;
+var float autocvar_notification_errors_are_fatal = TRUE;
+
+#ifdef SVQC
+.float FRAG_VERBOSE;
+void Notification_GetCvars(void);
+#else
+var float autocvar_notification_allow_chatboxprint = 1; // 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs
+var float autocvar_notification_show_sprees_center = TRUE;
+var float autocvar_notification_show_sprees_center_specialonly = TRUE;
+var float autocvar_notification_frag_verbose = TRUE;
+#endif
+
+
+// ============================
+//  Notification Argument List
+// ============================ TODO UPDATE THIS
+/*
+ These arguments get replaced with the Local_Notification_sprintf
+ and Local_Notification_HUD_Notify_Push functions to supply data
+ from networked notifications to their usage in sprintf... It
+ allows for more dynamic data to be inferred by the local
+ notification parser, so that the server does not have to network
+ anything too crazy on a per-client/per-situation basis.
+ Pay attention to the CSQC/SVQC relations, some of these are redefined
+ in slightly different ways for different programs, this is because the
+ server does a more conservative approach to the notifs than the client.
+ All arguments are swapped into strings, so be sure that your
+ sprintf usage matches with proper %s placement.
+ Argument descriptions:
+    s1-s4: string arguments to be literally swapped into sprintf
+    f1-f4: float arguments expanded into strings to be swapped into sprintf
+    f1p2dec: f1 float to string with 2 decimal places
+    f2p2dec: f2 float to string with 2 decimal places
+    pass_key: find the keybind for "passing" or "dropping" in CTF game mode
+    frag_ping: show the ping of a player
+    frag_stats: show health/armor/ping of a player
+    frag_pos: show score status and position in the match of a player
+    spree_cen: centerprint notif for kill spree/how many kills they have
+    spree_inf: info notif for kill spree/how many kills they have
+    spree_end: placed at the end of murder messages to show ending of sprees
+    spree_lost: placed at the end of suicide messages to show losing of sprees
+    death_team: show the full name of the team a player is switching from
+    weapon_name: return the full name of a weapon from a weaponid
+*/
+
+#define NOTIF_MAX_ARGS 7
+#define NOTIF_MAX_HUDARGS 2
+#define NOTIF_MAX_DURCNT 2
+
+string arg_slot[NOTIF_MAX_ARGS];
+
+#define ARG_CS_SV_HA 1 // enabled on CSQC, SVQC, and Hudargs
+#define ARG_CS_SV_DC 2 // enabled on CSQC, SVQC, and durcnt centerprint
+#define ARG_CS_SV 3 // enabled on CSQC and SVQC
+#define ARG_CS 4 // unique result to CSQC
+#define ARG_SV 5 // unique result to SVQC
+
+// todo possible idea.... declare how many floats/strings each arg needs, and then dynamically increment the input
+// this way, we don't need to have duplicates like i.e. s2loc and s3loc
+
+#define NOTIF_ARGUMENT_LIST \
+       ARG_CASE(ARG_CS_SV_HA,          "s1",                           s1) \
+       ARG_CASE(ARG_CS_SV_HA,          "s2",                           s2) \
+       ARG_CASE(ARG_CS_SV_HA,          "s3",                           s3) \
+       ARG_CASE(ARG_CS_SV_HA,          "s4",                           s4) \
+       ARG_CASE(ARG_CS_SV,             "s2loc",                        (autocvar_notification_show_location ? sprintf( ( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s2) : "")) \
+       ARG_CASE(ARG_CS_SV,             "s3loc",                        (autocvar_notification_show_location ? sprintf( ( ((tmp_s = autocvar_notification_show_location_string) != "") ? tmp_s : _(" (near %s)") ), s3) : "")) \
+       ARG_CASE(ARG_CS_SV_DC,          "f1",                           ftos(f1)) \
+       ARG_CASE(ARG_CS_SV_DC,          "f2",                           ftos(f2)) \
+       ARG_CASE(ARG_CS_SV,             "f3",                           ftos(f3)) \
+       ARG_CASE(ARG_CS_SV,             "f4",                           ftos(f4)) \
+       ARG_CASE(ARG_CS_SV,             "f1p2dec",                      ftos_decimals(f1/100, 2)) \
+       ARG_CASE(ARG_CS_SV,             "f2p2dec",                      ftos_decimals(f2/100, 2)) \
+       ARG_CASE(ARG_CS,                        "f1secs",                       count_seconds(f1)) \
+       ARG_CASE(ARG_CS_SV,                     "f1ord",                        count_ordinal(f1)) \
+       ARG_CASE(ARG_CS,                        "f1time",                       process_time("foobar", f1)) \
+       ARG_CASE(ARG_CS,                        "pass_key",             ((((tmp_s = getcommandkey("pass", "+use")) != "pass") && !(strstrofs(tmp_s, "not bound", 0) >= 0)) ? sprintf(CCR(_(" ^F1(Press %s)")), tmp_s) : "")) \
+       ARG_CASE(ARG_CS,                        "frag_ping",            ((f2 != NO_MSG) ? sprintf(CCR(_("\n(Ping ^2%d^BG)")), f2) : "")) \
+       ARG_CASE(ARG_CS,                        "frag_stats",           sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), f2, f3, ((f4 != NO_MSG) ? sprintf(CCR(_(" (Ping ^2%d^BG)")), f4) : ""))) \
+       /*ARG_CASE(ARG_CS,                      "frag_pos",                     ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ \
+       ARG_CASE(ARG_CS,                        "spree_cen",            (autocvar_notification_show_sprees ? notif_arg_spree_cen(f1) : "")) \
+       ARG_CASE(ARG_CS_SV,             "spree_inf",            (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) \
+       ARG_CASE(ARG_CS_SV,             "spree_end",            (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
+       ARG_CASE(ARG_CS_SV,             "spree_lost",           (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
+       ARG_CASE(ARG_CS_SV,             "weapon_name",          ftos(f1)) \
+       ARG_CASE(ARG_SV,                        "death_team",           Team_ColoredFullName(f1)) \
+       ARG_CASE(ARG_CS,                        "death_team",           Team_ColoredFullName(f1 - 1)) \
+       ARG_CASE(ARG_CS_SV,                     "race_time",            mmssss(f2)) \
+       ARG_CASE(ARG_CS_SV,             "race_diff",            ((f2 > f3) ? sprintf(CCR("^1[+%s]"), mmssss(f2 - f3)) : sprintf(CCR("^2[-%s]"), mmssss(f3 - f2))))
+
+#define NOTIF_HIT_MAX(count,funcname) if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; }
+#define NOTIF_HIT_UNKNOWN(token,funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; }
+
+#define KILL_SPREE_LIST \
+       SPREE_ITEM(3, 03, _("TRIPLE FRAG! "), _("%s^K1 made a TRIPLE FRAG! %s^BG"), _("%s^K1 made a TRIPLE SCORE! %s^BG")) \
+       SPREE_ITEM(5, 05, _("RAGE! "), _("%s^K1 unlocked RAGE! %s^BG"), _("%s^K1 made FIVE SCORES IN A ROW! %s^BG")) \
+       SPREE_ITEM(10, 10, _("MASSACRE! "), _("%s^K1 started a MASSACRE! %s^BG"), _("%s^K1 made TEN SCORES IN A ROW! %s^BG")) \
+       SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) \
+       SPREE_ITEM(20, 20, _("BERSERKER! "), _("%s^K1 is a BERSERKER! %s^BG"), _("%s^K1 made TWENTY SCORES IN A ROW! %s^BG")) \
+       SPREE_ITEM(25, 25, _("CARNAGE! "), _("%s^K1 inflicts CARNAGE! %s^BG"), _("%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG")) \
+       SPREE_ITEM(30, 30, _("ARMAGEDDON! "), _("%s^K1 unleashes ARMAGEDDON! %s^BG"), _("%s^K1 made THIRTY SCORES IN A ROW! %s^BG"))
+
+#ifdef CSQC
+string notif_arg_spree_cen(float spree)
+{
+       // 0 = off, 1 = target (but only for first victim) and attacker
+       if(autocvar_notification_show_sprees_center) 
+       {
+               if(spree > 1)
+               {
+                       #define SPREE_ITEM(counta,countb,center,normal,gentle) \
+                               case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
+                       
+                       switch(spree)
+                       {
+                               KILL_SPREE_LIST
+                               default:
+                               {
+                                       if not(autocvar_notification_show_sprees_center_specialonly)
+                                       {
+                                               return
+                                                       sprintf(
+                                                               normal_or_gentle(
+                                                                       _("%d frag spree! "),
+                                                                       _("%d score spree! ")
+                                                               ),
+                                                               spree);
+                                       }
+                                       else { return ""; } // don't show spree information if it isn't an achievement 
+                               }
+                       }
+
+                       #undef SPREE_ITEM
+               }
+               else if(spree == -1) // first blood
+               {
+                       return normal_or_gentle(_("First blood! "), _("First score! "));
+               }
+               else if(spree == -2) // first victim
+               {
+                       return normal_or_gentle(_("First victim! "), _("First casualty! "));
+               }
+       }
+       return "";
+}
+#endif
+
+string notif_arg_spree_inf(float type, string input, string player, float spree)
+{
+       switch(type)
+       {
+               case 1: // attacker kill spree
+               {
+                       // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
+                       // this conditional (& 2) is true for 2 and 3
+                       if(autocvar_notification_show_sprees_info & 2) 
+                       {
+                               #ifdef CSQC
+                               string spree_newline =
+                                       ( autocvar_notification_show_sprees_info_newline ?
+                                               ((substring(input, 0, 1) == "\{3}") ? "\n\{3}" : "\n") : "" );
+                               #else
+                               string spree_newline =
+                                       (autocvar_notification_show_sprees_info_newline ? "\n" : "");
+                               #endif
+                               
+                               if(spree > 1)
+                               {
+                                       #define SPREE_ITEM(counta,countb,center,normal,gentle) \
+                                               case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
+                                       
+                                       switch(spree)
+                                       {
+                                               KILL_SPREE_LIST
+                                               default:
+                                               {
+                                                       if not(autocvar_notification_show_sprees_info_specialonly)
+                                                       {
+                                                               return
+                                                                       sprintf(
+                                                                               CCR(normal_or_gentle(
+                                                                                       _("%s^K1 has %d frags in a row! %s^BG"),
+                                                                                       _("%s^K1 made %d scores in a row! %s^BG")
+                                                                               )),
+                                                                               player,
+                                                                               spree,
+                                                                               spree_newline
+                                                                       );
+                                                       }
+                                                       else { return ""; } // don't show spree information if it isn't an achievement 
+                                               }
+                                       }
+
+                                       #undef SPREE_ITEM
+                               }
+                               else if(spree == -1) // firstblood
+                               {
+                                       return
+                                               sprintf(
+                                                       CCR(normal_or_gentle(
+                                                               _("%s^K1 drew first blood! %s^BG"),
+                                                               _("%s^K1 got the first score! %s^BG")
+                                                       )),
+                                                       player,
+                                                       spree_newline
+                                               );
+                               }
+                       }
+                       break;
+               }
+
+               case -1: // kill spree ended
+               {
+                       if((spree > 1) && (autocvar_notification_show_sprees_info & 1))
+                       {
+                               return
+                                       sprintf(normal_or_gentle(
+                                               _(", ending their %d frag spree"),
+                                               _(", ending their %d score spree")
+                                               ),
+                                               spree
+                                       );
+                       }
+                       break;
+               }
+
+               case -2: // kill spree lost
+               {
+                       if((spree > 1) && (autocvar_notification_show_sprees_info & 1))
+                       {
+                               return
+                                       sprintf(normal_or_gentle(
+                                               _(", losing their %d frag spree"),
+                                               _(", losing their %d score spree")
+                                               ),
+                                               spree
+                                       );
+                       }
+                       break;
+               }
+       }
+       return "";
+}
+
+
+// ====================================
+//  Initialization/Create Declarations
+// ====================================
+
+#define NOTIF_FIRST 1
+#define NOTIF_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
+
+// error detection
+float notif_error;
+float notif_global_error;
+
+// notification entities
+entity msg_info_notifs[NOTIF_MAX];
+entity msg_center_notifs[NOTIF_MAX];
+entity msg_weapon_notifs[NOTIF_MAX];
+entity msg_death_notifs[NOTIF_MAX];
+
+// notification counts
+float NOTIF_INFO_COUNT;
+float NOTIF_CENTER_COUNT;
+float NOTIF_WEAPON_COUNT;
+float NOTIF_DEATH_COUNT;
+float NOTIF_CPID_COUNT;
+
+// notification entity values
+.float nent_default;
+.string nent_name;
+.float nent_id;
+.float nent_enabled;
+.entity nent_msginfo;
+.entity nent_msgcenter;
+.float nent_stringcount;
+.float nent_floatcount; 
+.string nent_args;
+.string nent_hudargs;
+.string nent_icon;
+.float nent_cpid;
+.string nent_durcnt;
+.string nent_string;
+
+// networked notification values
+.float nent_broadcast;
+.entity nent_client;
+.float nent_net_type;
+.float nent_net_name;
+.string nent_strings[4];
+.float nent_floats[4];
+
+string Process_Notif_Line(float check_newline, float chat, string input, string notiftype, string notifname, string stringtype)
+{
+       if(check_newline)
+       {
+               #ifdef CSQC
+               if((chat && autocvar_notification_allow_chatboxprint)
+                       || (autocvar_notification_allow_chatboxprint == 2))
+               {
+                       // pass 1: add ETX char at beginning of line
+                       input = strcat("\{3}", input);
+
+                       // pass 2: add ETX char at end of each new line (so that messages with multiple lines are put through chatbox too)
+                       input = strreplace("\n", "\n\{3}", input);
+
+                       // pass 3: strip trailing ETX char
+                       if(substring(input, (strlen(input) - 1), 1) == "\{3}")
+                               { input = substring(input, 0, (strlen(input) - 1)); }
+               }
+               #endif
+               if(substring(input, (strlen(input) - 1), 1) != "\n")
+               {
+                       print(sprintf("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = MSG_%s, net_name = %s, string = %s.\n", notiftype, notifname, stringtype));
+                       notif_error = TRUE;
+                       return strcat(input, "\n");
+               }
+       }
+       return input;
+}
+
+string Process_Notif_Args(float arg_type, string args, string notiftype, string notifname)
+{
+       string selected, remaining = args;
+       float sel_num = 0;
+
+       for(;(remaining != "");)
+       {
+               selected = car(remaining); remaining = cdr(remaining);
+
+               switch(arg_type)
+               {
+                       case 1: // normal args
+                       {
+                               if(sel_num == NOTIF_MAX_ARGS)
+                               {
+                                       print(sprintf("^1NOTIFICATION HAS TOO MANY ARGUMENTS: ^7net_type = MSG_%s, net_name = %s, max args = %d.\n",
+                                               notiftype, notifname, NOTIF_MAX_ARGS));
+                                       notif_error = TRUE;
+                                       break;
+                               }
+
+                               switch(strtolower(selected))
+                               {
+                                       #define ARG_CASE(prog,selected,result) case selected: { ++sel_num; break; }
+                                       NOTIF_ARGUMENT_LIST
+                                       #undef ARG_CASE
+                                       default:
+                                       {
+                                               print(sprintf("^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ^7net_type = MSG_%s, net_name = %s, args arg = '%s'.\n",
+                                                       notiftype, notifname, selected));
+                                               notif_error = TRUE;
+                                               break;
+                                       }
+                               }
+                               break;
+                       }
+                       case 2: // hudargs
+                       {
+                               if(sel_num == NOTIF_MAX_HUDARGS)
+                               {
+                                       print(sprintf("^1NOTIFICATION HAS TOO MANY ARGUMENTS: ^7net_type = MSG_%s, net_name = %s, max hudargs = %d.\n",
+                                               notiftype, notifname, NOTIF_MAX_HUDARGS));
+                                       notif_error = TRUE;
+                                       break;
+                               }
+
+                               switch(strtolower(selected))
+                               {
+                                       #define ARG_CASE(prog,selected,result) \
+                                               #if (prog == ARG_CS_SV_HA) \
+                                                       case selected: { ++sel_num; break; } \
+                                               #endif
+                                       NOTIF_ARGUMENT_LIST
+                                       #undef ARG_CASE
+                                       default:
+                                       {
+                                               print(sprintf("^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ^7net_type = MSG_%s, net_name = %s, hudargs arg = '%s'.\n",
+                                                       notiftype, notifname, selected));
+                                               notif_error = TRUE;
+                                               break;
+                                       }
+                               }
+                               break;
+                       }
+                       case 3: // durcnt 
+                       {
+                               if(sel_num == NOTIF_MAX_DURCNT)
+                               {
+                                       print(sprintf("^1NOTIFICATION HAS TOO MANY ARGUMENTS: ^7net_type = MSG_%s, net_name = %s, max durcnt = %d.\n",
+                                               notiftype, notifname, NOTIF_MAX_DURCNT));
+                                       notif_error = TRUE;
+                                       break;
+                               }
+
+                               switch(strtolower(selected))
+                               {
+                                       #define ARG_CASE(prog,selected,result) \
+                                               #if (prog == ARG_CS_SV_DC) \
+                                                       case selected: { ++sel_num; break; } \
+                                               #endif
+                                       NOTIF_ARGUMENT_LIST
+                                       #undef ARG_CASE
+                                       default:
+                                       {
+                                               if(ftos(stof(selected)) != "") { ++sel_num; }
+                                               else
+                                               {
+                                                       print(sprintf("^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ^7net_type = MSG_%s, net_name = %s, durcnt arg = '%s'.\n",
+                                                               notiftype, notifname, selected));
+                                                       notif_error = TRUE;
+                                               }
+                                               break;
+                                       }
+                               }
+                               break;
+                       }
+               }
+       }
+       return args;
+}
+
+#define CREATE_NOTIF_ENTITY(default,type,name,infoname,centername,strnum,flnum,args,hudargs,icon,cpid,durcnt,normal,gentle,check_newline,subcalls) \
+{ \
+       notif_error = FALSE; \
+       \
+       /* global entity setup */ \
+       entity notif = spawn(); \
+       msg_##type##_notifs[name - 1] = notif; \
+       notif.classname = "msg_#type#_notification"; \
+       notif.nent_default = default; \
+       notif.nent_name = strzone(#name); \
+       notif.nent_id = name; \
+       notif.nent_enabled = (1 <= autocvar_notification_##name); \
+       \
+       /* notification specific settings */ \
+       #if subcalls /* MSG_DEATH and MSG_WEAPON */ \
+               #if (infoname == NO_MSG) && (centername == NO_MSG) \
+                       print(sprintf("^1NOTIFICATION WITH NO SUBCALLS: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); \
+                       notif_error = TRUE; \
+               #else \
+                       float infoname_stringcount = 0, infoname_floatcount = 0, centername_stringcount = 0, centername_floatcount = 0; \
+                       #if (infoname != NO_MSG) \
+                               notif.nent_msginfo = msg_info_notifs[infoname - 1]; \
+                               infoname_stringcount = notif.nent_msginfo.nent_stringcount; \
+                               infoname_floatcount = notif.nent_msginfo.nent_floatcount; \
+                       #endif \
+                       #if (centername != NO_MSG) \
+                               notif.nent_msgcenter = msg_center_notifs[centername - 1]; \
+                               centername_stringcount = notif.nent_msgcenter.nent_stringcount; \
+                               centername_floatcount = notif.nent_msgcenter.nent_floatcount; \
+                       #endif \
+                       /* set the requirements of THIS notification to the total requirements of its subcalls */ \
+                       notif.nent_stringcount = max(infoname_stringcount, centername_stringcount); \
+                       notif.nent_floatcount = max(infoname_floatcount, centername_floatcount); \
+               #endif \
+       #else /* MSG_INFO and MSG_CENTER */ \
+               float nent_chat = (autocvar_notification_##name > 1); \
+               \
+               notif.nent_stringcount = strnum; \
+               notif.nent_floatcount = flnum; \
+               if(strnum + flnum) \
+               { \
+                       if(args != "") { notif.nent_args = strzone(Process_Notif_Args(1, args, strtoupper(#type), #name)); } \
+                       else if((hudargs == "") && (durcnt =="")) { print(sprintf("^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: ^7net_type = MSG_%s, net_name = %s, strnum = %d, flnum = %d\n", strtoupper(#type), #name, strnum, flnum)); notif_error = TRUE; } \
+               } \
+               else if(args != "") { notif.nent_args = strzone(Process_Notif_Args(1, args, strtoupper(#type), #name)); } \
+               \
+               /* MSG_INFO only */ \
+               if(hudargs != "") \
+               { \
+                       notif.nent_hudargs = strzone(Process_Notif_Args(2, hudargs, strtoupper(#type), #name)); \
+                       if(icon != "") { notif.nent_icon = strzone(icon); } \
+                       else { print(sprintf("^1NOTIFICATION HAS HUDARGS BUT NO ICON: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); notif_error = TRUE; } \
+               } \
+               else if(icon != "") { print(sprintf("^1NOTIFICATION HAS ICON BUT NO HUDARGS: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); notif_error = TRUE; } \
+               \
+               /* MSG_CENTER only */ \
+               if(durcnt != "") \
+               { \
+                       notif.nent_durcnt = strzone(Process_Notif_Args(3, durcnt, strtoupper(#type), #name)); \
+                       if(cpid != NO_MSG) { notif.nent_cpid = cpid; } \
+                       else { print(sprintf("^1NOTIFICATION HAS DURCNT BUT NO CPID: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); notif_error = TRUE; } \
+               } \
+               else if(cpid != NO_MSG) { notif.nent_cpid = cpid; } \
+               \
+               /* string setup */ \
+               /* select gentle/normal string and bake color codes in on init, this way it does not need to be re-processed at run time */ \
+               if(GENTLE) \
+               { \
+                       if(gentle != "") { notif.nent_string = strzone(CCR(Process_Notif_Line(check_newline, nent_chat, gentle, strtoupper(#type), #name, "GENTLE"))); } \
+                       else if(normal != "") { notif.nent_string = strzone(CCR(Process_Notif_Line(check_newline, nent_chat, normal, strtoupper(#type), #name, "NORMAL"))); } \
+               } \
+               else if(normal != "") { notif.nent_string = strzone(CCR(Process_Notif_Line(check_newline, nent_chat, normal, strtoupper(#type), #name, "NORMAL"))); } \
+               if(notif.nent_string == "") { print(sprintf("^1EMPTY NOTIFICATION: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); notif_error = TRUE; } \
+       #endif \
+       \
+       /* now check to see if any errors happened */ \
+       if(notif_error) \
+       { \
+               notif.nent_enabled = FALSE; /* disable the notification so it can't cause trouble */ \
+               notif_global_error = TRUE; /* throw the red flag that an error happened on init */ \
+       } \
+}
+
+#define MSG_INFO_NOTIF(default,name,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       NOTIF_ADD_AUTOCVAR(name, default) \
+       float name; \
+       void RegisterNotification_##name() \
+       { \
+               SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
+               CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_INFO_COUNT, "notifications") \
+               CREATE_NOTIF_ENTITY( \
+                       default,        /* default */ \
+                       info,           /* type */ \
+                       name,           /* name */ \
+                       NO_MSG,         /* infoname */ \
+                       NO_MSG,         /* centername */ \
+                       strnum,         /* strnum */ \
+                       flnum,          /* flnum */ \
+                       args,           /* args */ \
+                       hudargs,        /* hudargs */ \
+                       icon,           /* icon */ \
+                       NO_MSG,         /* cpid */ \
+                       "",             /* durcnt */ \
+                       normal,         /* normal */ \
+                       gentle,         /* gentle */ \
+                       1,                      /* check_newline */ \
+                       0)                      /* subcalls */ \
+       } \
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+
+#define MSG_CENTER_NOTIF(default,name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       NOTIF_ADD_AUTOCVAR(name, default) \
+       float name; \
+       float cpid; \
+       void RegisterNotification_##name() \
+       { \
+               SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
+               SET_FIELD_COUNT(cpid, NOTIF_FIRST, NOTIF_CPID_COUNT) \
+               CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_CENTER_COUNT, "notifications") \
+               CREATE_NOTIF_ENTITY( \
+                       default,        /* default */ \
+                       center,         /* type */ \
+                       name,           /* name */ \
+                       NO_MSG,         /* infoname */ \
+                       NO_MSG,         /* centername */ \
+                       strnum,         /* strnum */ \
+                       flnum,          /* flnum */ \
+                       args,           /* args */ \
+                       "",             /* hudargs */ \
+                       "",             /* icon */ \
+                       cpid,           /* cpid */ \
+                       durcnt,         /* durcnt */ \
+                       normal,         /* normal */ \
+                       gentle,         /* gentle */ \
+                       0,                      /* check_newline */ \
+                       0)                      /* subcalls */ \
+       } \
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+
+#define MSG_WEAPON_NOTIF(default,name,infoname,centername) \
+       NOTIF_ADD_AUTOCVAR(name, default) \
+       float name; \
+       void RegisterNotification_##name() \
+       { \
+               SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_WEAPON_COUNT) \
+               CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_WEAPON_COUNT, "notifications") \
+               CREATE_NOTIF_ENTITY( \
+                       default,        /* default */ \
+                       weapon,         /* type */ \
+                       name,           /* name */ \
+                       infoname,       /* infoname */ \
+                       centername, /* centername */ \
+                       NO_MSG,         /* strnum */ \
+                       NO_MSG,         /* flnum */ \
+                       "",             /* args */ \
+                       "",             /* hudargs */ \
+                       "",             /* icon */ \
+                       NO_MSG,         /* cpid */ \
+                       "",             /* durcnt */ \
+                       "",             /* normal */ \
+                       "",             /* gentle */ \
+                       0,                      /* check_newline */ \
+                       1)                      /* subcalls */ \
+       } \
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+
+#define MSG_DEATH_NOTIF(default,name,infoname,centername) \
+       NOTIF_ADD_AUTOCVAR(name, default) \
+       float name; \
+       void RegisterNotification_##name() \
+       { \
+               SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_DEATH_COUNT) \
+               CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_DEATH_COUNT, "notifications") \
+               CREATE_NOTIF_ENTITY( \
+                       default,        /* default */ \
+                       death,          /* type */ \
+                       name,           /* name */ \
+                       infoname,       /* infoname */ \
+                       centername, /* centername */ \
+                       NO_MSG,         /* strnum */ \
+                       NO_MSG,         /* flnum */ \
+                       "",             /* args */ \
+                       "",             /* hudargs */ \
+                       "",             /* icon */ \
+                       NO_MSG,         /* cpid */ \
+                       "",             /* durcnt */ \
+                       "",             /* normal */ \
+                       "",             /* gentle */ \
+                       0,                      /* check_newline */ \
+                       1)                      /* subcalls */ \
+       } \
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+
+void RegisterNotifications_First()
+{
+       notif_global_error = FALSE;
+       
+       // maybe do another implementation of this with checksums? for now, we don't need versioning
+       /*if(autocvar_notification_version != NOTIF_VERSION)
+       {
+               #ifdef CSQC
+               if(autocvar_notification_version_mismatch_client_error)
+               #else
+               if(autocvar_notification_version_mismatch_server_error)
+               #endif
+                       notif_global_error = TRUE;
+
+               print(sprintf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n",
+                       "foobar", autocvar_notification_version, NOTIF_VERSION));
+       }*/
+}
+
+void RegisterNotifications_Done()
+{
+       if(notif_global_error && autocvar_notification_errors_are_fatal)
+       {
+               // shit happened... stop the loading of the program now
+               error("Notification initialization failed!");
+       }
+}
+
+// NOW we actually activate the declarations
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First)
+MSG_INFO_NOTIFICATIONS
+MSG_CENTER_NOTIFICATIONS
+MSG_WEAPON_NOTIFICATIONS
+MSG_DEATH_NOTIFICATIONS
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done)
+#undef MSG_INFO_NOTIF
+#undef MSG_CENTER_NOTIF
+#undef MSG_WEAPON_NOTIF
+#undef MSG_DEATH_NOTIF
+
+#undef NOTIF_ADD_AUTOCVAR
diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh
new file mode 100644 (file)
index 0000000..c15f461
--- /dev/null
@@ -0,0 +1,145 @@
+#ifdef TEAMNUMBERS_THAT_ARENT_STUPID
+const float FL_TEAM_1 = 1;  // red
+const float FL_TEAM_2 = 2; // blue
+const float FL_TEAM_3 = 3; // yellow
+const float FL_TEAM_4 = 4; // pink
+const float FL_SPECTATOR = 5;
+#else
+#ifdef CSQC
+const float FL_TEAM_1 = 4;  // red
+const float FL_TEAM_2 = 13; // blue
+const float FL_TEAM_3 = 12; // yellow
+const float FL_TEAM_4 = 9; // pink
+#else
+const float FL_TEAM_1 = 5;  // red
+const float FL_TEAM_2 = 14; // blue
+const float FL_TEAM_3 = 13; // yellow
+const float FL_TEAM_4 = 10; // pink
+#endif
+const float FL_SPECTATOR = 1337;
+#endif
+
+const string COL_TEAM_1 = "^1";
+const string COL_TEAM_2 = "^4";
+const string COL_TEAM_3 = "^3";
+const string COL_TEAM_4 = "^6";
+const string STR_TEAM_1 = _("Red");
+const string STR_TEAM_2 = _("Blue");
+const string STR_TEAM_3 = _("Yellow");
+const string STR_TEAM_4 = _("Pink");
+const string STR_TEAM = _("Team");
+const string STR_NEUTRAL = _("Neutral");
+
+#define APP_TEAM_NUM_2(num,prefix) ((num == FL_TEAM_1) ? prefix##RED : prefix##BLUE)
+#define APP_TEAM_NUM_4(num,prefix) ((num == FL_TEAM_1) ? prefix##RED : ((num == FL_TEAM_2) ? prefix##BLUE : ((num == FL_TEAM_3) ? prefix##YELLOW : prefix##PINK)))
+#define APP_TEAM_ENT_2(ent,prefix) ((ent.team == FL_TEAM_1) ? prefix##RED : prefix##BLUE)
+#define APP_TEAM_ENT_4(ent,prefix) ((ent.team == FL_TEAM_1) ? prefix##RED : ((ent.team == FL_TEAM_2) ? prefix##BLUE : ((ent.team == FL_TEAM_3) ? prefix##YELLOW : prefix##PINK)))
+
+#ifdef CSQC
+float teamplay;
+float myteam;
+#endif
+
+string Team_ColorCode(float teamid)
+{
+    switch(teamid)
+    {
+               case FL_TEAM_1: return COL_TEAM_1;
+       case FL_TEAM_2: return COL_TEAM_2;
+       case FL_TEAM_3: return COL_TEAM_3;
+       case FL_TEAM_4: return COL_TEAM_4;
+       }
+       
+       return "^7";
+}
+
+vector Team_ColorRGB(float teamid)
+{
+       switch(teamid)
+       {
+               #ifdef TEAMNUMBERS_THAT_ARENT_STUPID
+               case FL_TEAM_1: return '1 0 0'; // red
+               case FL_TEAM_2: return '0 0 1'; // blue
+               case FL_TEAM_3: return '1 1 0'; // yellow
+               case FL_TEAM_4: return '1 0 1'; // pink
+               #else
+               case FL_TEAM_1: return '1 0.0625 0.0625';
+               case FL_TEAM_2: return '0.0625 0.0625 1';
+               case FL_TEAM_3: return '1 1 0.0625';
+               case FL_TEAM_4: return '1 0.0625 1';
+               #endif
+       }
+
+    return '0 0 0';
+}
+
+string Team_ColorName(float teamid)
+{
+    switch(teamid)
+    {
+               case FL_TEAM_1: return STR_TEAM_1;
+       case FL_TEAM_2: return STR_TEAM_2;
+       case FL_TEAM_3: return STR_TEAM_3;
+       case FL_TEAM_4: return STR_TEAM_4;
+       }
+       
+    return STR_NEUTRAL;
+}
+
+float Team_ColorToTeam(string team_color)
+{
+       switch(strtolower(team_color))
+       {
+               case "red": return FL_TEAM_1;
+       case "blue": return FL_TEAM_2;
+       case "yellow": return FL_TEAM_3;
+       case "pink": return FL_TEAM_4;
+       case "auto": return 0;
+       }
+       
+       return -1;
+}
+
+float Team_NumberToTeam(float number)
+{
+       switch(number)
+       {
+               case 1: return FL_TEAM_1;
+               case 2: return FL_TEAM_2;
+               case 3: return FL_TEAM_3;
+               case 4: return FL_TEAM_4;
+       }
+       
+       return -1;
+}
+
+float Team_TeamToNumber(float teamid)
+{
+       switch(teamid)
+       {
+               case FL_TEAM_1: return 1;
+               case FL_TEAM_2: return 2;
+               case FL_TEAM_3: return 3;
+               case FL_TEAM_4: return 4;
+       }
+       
+       return -1;
+}
+
+
+// legacy aliases for shitty code
+#define TeamByColor(teamid) (Team_TeamToNumber(teamid) - 1)
+#define ColorByTeam(number) Team_NumberToTeam(number + 1)
+
+// useful aliases
+#define Team_ColorName_Lower(teamid) strtolower(Team_ColorName(teamid))
+#define Team_ColorName_Upper(teamid) strtoupper(Team_ColorName(teamid))
+
+#define Team_FullName(teamid) strcat(Team_ColorName(teamid), " ", STR_TEAM, "^7")
+#define Team_ColoredFullName(teamid) strcat(Team_ColorCode(teamid), Team_ColorName(teamid), " ", STR_TEAM, "^7")
+
+#define Team_NumberToFullName(number) Team_FullName(Team_NumberToTeam(number))
+#define Team_NumberToColoredFullName(number) Team_ColoredFullName(Team_NumberToTeam(number))
+
+// replace these flags in a string with the strings provided
+#define TCR(input,teamcolor,teamtext) strreplace("^TC", teamcolor, strreplace("^TT", teamtext, input))
index 8f6a9c05c6b83dced5878f492c7e14593e46ed4a..390321c4e49fefb6971f236408979396f085d4a6 100644 (file)
@@ -2504,6 +2504,79 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
                queue_start.FindConnectedComponent_processing = 0;
 }
 
+float Count_Proper_Strings(string improper, string...count)
+{
+       float i, total = 0;
+       string tmp;
+       
+       for(i = 0; i < count; ++i)
+       {
+               tmp = ...(i, string);
+               if((tmp) && (tmp != improper)) { ++total; }
+       }
+       
+       return total;
+}
+
+float Count_Proper_Floats(float improper, float...count)
+{
+       float i, total = 0;
+       
+       for(i = 0; i < count; ++i)
+       {
+               if(...(i, float) != improper) { ++total; }
+       }
+       
+       return total;
+}
+
+// todo: this sucks, lets find a better way to do backtraces?
+#ifndef MENUQC
+void backtrace(string msg)
+{
+       float dev, war;
+       #ifdef SVQC
+       dev = autocvar_developer;
+       war = autocvar_prvm_backtraceforwarnings;
+       #else
+       dev = cvar("developer");
+       war = cvar("prvm_backtraceforwarnings");
+       #endif
+       cvar_set("developer", "1");
+       cvar_set("prvm_backtraceforwarnings", "1");
+       print("\n");
+       print("--- CUT HERE ---\nWARNING: ");
+       print(msg);
+       print("\n");
+       remove(world); // isn't there any better way to cause a backtrace?
+       print("\n--- CUT UNTIL HERE ---\n");
+       cvar_set("developer", ftos(dev));
+       cvar_set("prvm_backtraceforwarnings", ftos(war));
+}
+#endif
+
+// color code replace, place inside of sprintf and parse the string
+string CCR(string input)
+{
+       // See the autocvar declarations in util.qh for default values
+       
+       // foreground/normal colors
+       input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input); 
+       input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input); 
+       input = strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), input); 
+       input = strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), input); 
+
+       // "kill" colors
+       input = strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), input);
+       input = strreplace("^K2", strcat("^", autocvar_hud_colorset_kill_2), input);
+       input = strreplace("^K3", strcat("^", autocvar_hud_colorset_kill_3), input);
+
+       // background colors
+       input = strreplace("^BG", strcat("^", autocvar_hud_colorset_background), input);
+       input = strreplace("^N", "^7", input); // "none"-- reset to white...
+       return input;
+}
+
 vector vec3(float x, float y, float z)
 {
        vector v;
@@ -2532,3 +2605,105 @@ vector animfixfps(entity e, vector a, vector b)
        return a;
 }
 #endif
+
+string count_ordinal(float interval)
+{
+       // This function is designed primarily for the English language, it's impossible
+       // to accomodate all languages unless we do a specific function for each one...
+       // and since that's not technically feasible/practical, this is all we've got folks.
+
+       // Basically, it just allows you to represent a number or count in different ways
+       // depending on the number... like, with count_ordinal you can provide integers
+       // and retrieve 1st, 2nd, 3rd, nth ordinal numbers in a clean and simple way.
+
+       switch(mod(floor(interval), 100))
+       {
+               // if the first two numbers are 11,12,13, use nth for output
+               case 11:
+               case 12:
+               case 13:
+                       { return sprintf(_("%dth"), interval); }
+               
+               default:
+               {
+                       // otherwise, check normally for 1st,2nd,3rd insertions
+                       switch(mod(interval, 10))
+                       {
+                               case 1: return sprintf(_("%dst"), interval);
+                               case 2: return sprintf(_("%dnd"), interval);
+                               case 3: return sprintf(_("%drd"), interval);
+                       }
+                       return sprintf(_("%dth"), interval);
+               }
+       }
+       return "";
+}
+
+string count_fill(float interval, string zeroth, string first, string second, string third, string multi)
+{
+       // This function is designed primarily for the English language, it's impossible
+       // to accomodate all languages unless we do a specific function for each one...
+       // and since that's not technically feasible/practical, this is all we've got folks.
+
+       // Here you can insert specific strings based on the interval number, so you could do
+       // i.e. count_seconds which outputs like this:
+       //   0 seconds
+       //   1 second
+       //   2 seconds
+       //   3 seconds
+       //   etc... minutes, hours, days, etc. 
+
+       switch(floor(interval))
+       {
+               case 0: return sprintf(zeroth, interval);
+               case 1:
+               {
+                       if(interval == 1) // EXACTLY value of 1
+                               return sprintf(first, interval);
+                       else
+                               return sprintf(multi, interval);
+               }
+               case 2: return sprintf(second, interval);
+               case 3: return sprintf(third, interval);
+               default: return sprintf(multi, interval);
+       }
+       return "";
+}
+
+string process_time(string fields, float seconds)
+{
+       float tmp_hours = 0, tmp_minutes = 0, tmp_seconds = 0;
+       float tmp_years = 0, tmp_weeks = 0, tmp_days = 0;
+       
+       tmp_seconds = floor(seconds);
+
+       if(tmp_seconds)
+               { tmp_minutes = floor(tmp_seconds / 60); }
+       
+       if(tmp_minutes)
+               { tmp_seconds -= (tmp_minutes * 60);
+               tmp_hours = floor(tmp_minutes / 60); }
+
+       if(tmp_hours)
+               { tmp_minutes -= (tmp_hours * 60); }
+
+               if(tmp_hours)
+                       { tmp_days = floor(tmp_hours / 24); }
+                       
+               if(tmp_days)
+                       { tmp_hours -= (tmp_days * 60);
+                       tmp_weeks = floor(tmp_days / 7); }
+
+               if(tmp_weeks)
+                       { tmp_days -= (tmp_weeks * 60);
+                       tmp_years = floor(tmp_weeks / 52); }
+
+       //fields = strreplace("
+       /*switch(output)
+       {
+               case 1: return sprintf("%02d:%02d:%02d", tmp_hours, tmp_minutes, tmp_seconds);
+               //todo
+               default: return "";
+       }*/
+       return "";
+}
index 93a62fcf6db628fa7ce8ff9dce5f1bb58b09868a..11b2506d5052db1d6b931fc22fcc04fb1c5ca199 100644 (file)
@@ -1,6 +1,9 @@
 // a dummy macro that prevents the "hanging ;" warning
 #define ENDS_WITH_CURLY_BRACE
 
+// return the actual code name of a var as a string
+#define VAR_TO_TEXT(var) #var
+
 #ifdef HAVE_YO_DAWG_CPP
 // TODO make ascii art pic of xzibit
 // YO DAWG!
@@ -37,6 +40,11 @@ void ACCUMULATE_call(string func)
        ACCUMULATE_call(#func)
 #endif
 
+// used for simplifying ACCUMULATE_FUNCTIONs
+#define SET_FIRST_OR_LAST(input,first,count) if(!input) { input = (first + count); }
+#define SET_FIELD_COUNT(field,first,count) if(!field) { field = (first + count); ++count; }
+#define CHECK_MAX_COUNT(name,max,count,type) if(count == max) { error(strcat("Maximum ", type, " hit: ", VAR_TO_TEXT(name), ": ", ftos(count), ".\n")); }
+
 // this returns a tempstring containing a copy of s with additional \n newlines added, it also replaces \n in the text with a real newline
 // NOTE: s IS allowed to be a tempstring
 string wordwrap(string s, float l);
@@ -353,8 +361,6 @@ void queue_to_execute_next_frame(string s);
 // for marking written-to values as unused where it's a good idea to do this
 noref float unused_float;
 
-
-
 // a function f with:
 // f(0) = 0
 // f(1) = 1
@@ -371,8 +377,71 @@ typedef entity(entity cur, entity near, entity pass) findNextEntityNearFunction_
 typedef float(entity a, entity b, entity pass) isConnectedFunction_t;
 void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass);
 
+// expand multiple arguments into one argument by stripping parenthesis
+#define XPD(...) __VA_ARGS__
+
+float Count_Proper_Strings(string improper, string...count);
+float Count_Proper_Floats(float improper, float...count);
+
+#ifndef MENUQC
+void backtrace(string msg);
+#endif
+
+// color code replace, place inside of sprintf and parse the string... defaults described as constants
+// foreground/normal colors
+var string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green  // primary priority (important names, etc)
+var string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
+var string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue   // tertiary priority or relatively inconsequential text
+var string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red    // notice/attention grabbing texting
+// "kill" colors
+var string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red    // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
+var string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
+var string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue   // "good" or "beneficial" text (you fragging someone, etc)
+// background color
+var string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text
+
+string CCR(string input);
+
+#ifndef MENUQC
+#ifdef CSQC
+#define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
+#else
+#define GENTLE autocvar_sv_gentle
+#endif
+#define normal_or_gentle(normal,gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
+#endif
+
+// allow writing to also pass through to spectators (like so spectators see the same centerprints as players for example)
+#define WRITESPECTATABLE_MSG_ONE_VARNAME(varname,statement) entity varname; varname = msg_entity; FOR_EACH_REALCLIENT(msg_entity) if(msg_entity == varname || (msg_entity.classname == STR_SPECTATOR && msg_entity.enemy == varname)) statement msg_entity = varname
+#define WRITESPECTATABLE_MSG_ONE(statement) WRITESPECTATABLE_MSG_ONE_VARNAME(oldmsg_entity, statement)
+#define WRITESPECTATABLE(msg,statement) if(msg == MSG_ONE) { WRITESPECTATABLE_MSG_ONE(statement); } else statement float WRITESPECTATABLE_workaround = 0
+
 vector vec3(float x, float y, float z);
 
 #ifndef MENUQC
 vector animfixfps(entity e, vector a, vector b);
 #endif
+
+#define count_minutes_decs(time,decs) sprintf(ZCTX(_("CI_DEC^%s minutes")), ftos_decimals(time, decs))
+
+#define count_minutes(time) count_fill(time, \
+               ZCTX(_("CI_ZER^%d minutes")), /* zeroth */ \
+               ZCTX(_("CI_FIR^%d minute")),  /* first */ \
+               ZCTX(_("CI_SEC^%d minutes")), /* minute */ \
+               ZCTX(_("CI_THI^%d minutes")), /* third */ \
+               ZCTX(_("CI_MUL^%d minutes"))) /* multi */
+
+#define count_seconds_decs(time,decs) sprintf(ZCTX(_("CI_DEC^%s seconds")), ftos_decimals(time, decs))
+
+#define count_seconds(time) count_fill(time, \
+               ZCTX(_("CI_ZER^%d seconds")), /* zeroth */ \
+               ZCTX(_("CI_FIR^%d second")),  /* first */ \
+               ZCTX(_("CI_SEC^%d seconds")), /* second */ \
+               ZCTX(_("CI_THI^%d seconds")), /* third */ \
+               ZCTX(_("CI_MUL^%d seconds"))) /* multi */
+
+string count_ordinal(float interval);
+
+string count_fill(float interval, string zeroth, string first, string second, string third, string multi);
+
+string process_time(string fields, float seconds);
index e45a4813a6d257bc512e10dbae643c0db61500fa..47db61ba730925a5c4f7157a12da54b15ee63126 100644 (file)
@@ -13,6 +13,7 @@ config.qh
 
 oo/base.h
 
+../common/teams.qh
 ../common/constants.qh
 ../common/mapinfo.qh
 ../common/campaign_common.qh
index ef81fd92bad7db138edb2fa1e1067d252bae875b..bb52a4ae25505d7ba4ec9de4914ecae2fa6299f8 100644 (file)
@@ -293,22 +293,22 @@ void count_players()
        // count amount of players in each team
        total_players = red_players = blue_players = yellow_players = pink_players = 0;
        FOR_EACH_PLAYER(self) {
-               if (self.team == COLOR_TEAM1)
+               if (self.team == FL_TEAM_1)
                {
                        red_players += 1;
                        total_players += 1;
                }
-               else if (self.team == COLOR_TEAM2)
+               else if (self.team == FL_TEAM_2)
                {
                        blue_players += 1;
                        total_players += 1;
                }
-               else if (self.team == COLOR_TEAM3)
+               else if (self.team == FL_TEAM_3)
                {
                        yellow_players += 1;
                        total_players += 1;
                }
-               else if (self.team == COLOR_TEAM4)
+               else if (self.team == FL_TEAM_4)
                {
                        pink_players += 1;
                        total_players += 1;
@@ -322,12 +322,12 @@ void count_alive_players()
        if(g_ca)
        {
                FOR_EACH_PLAYER(self) {
-                       if (self.team == COLOR_TEAM1 && self.health >= 1)
+                       if (self.team == FL_TEAM_1 && self.health >= 1)
                        {
                                redalive += 1;
                                totalalive += 1;
                        }
-                       else if (self.team == COLOR_TEAM2 && self.health >= 1)
+                       else if (self.team == FL_TEAM_2 && self.health >= 1)
                        {
                                bluealive += 1;
                                totalalive += 1;
@@ -342,22 +342,22 @@ void count_alive_players()
        {
                // count amount of alive players in each team
                FOR_EACH_PLAYER(self) {
-                       if (self.team == COLOR_TEAM1 && self.freezetag_frozen == 0 && self.health >= 1)
+                       if (self.team == FL_TEAM_1 && self.freezetag_frozen == 0 && self.health >= 1)
                        {
                                redalive += 1;
                                totalalive += 1;
                        }
-                       else if (self.team == COLOR_TEAM2 && self.freezetag_frozen == 0 && self.health >= 1)
+                       else if (self.team == FL_TEAM_2 && self.freezetag_frozen == 0 && self.health >= 1)
                        {
                                bluealive += 1;
                                totalalive += 1;
                        }
-                       else if (self.team == COLOR_TEAM3 && self.freezetag_frozen == 0 && self.health >= 1)
+                       else if (self.team == FL_TEAM_3 && self.freezetag_frozen == 0 && self.health >= 1)
                        {
                                yellowalive += 1;
                                totalalive += 1;
                        }
-                       else if (self.team == COLOR_TEAM4 && self.freezetag_frozen == 0 && self.health >= 1)
+                       else if (self.team == FL_TEAM_4 && self.freezetag_frozen == 0 && self.health >= 1)
                        {
                                pinkalive += 1;
                                totalalive += 1;
@@ -400,12 +400,12 @@ void Spawnqueue_Check()
                                if(redalive) {
                                        play2all("ctf/red_capture.wav");
                                        FOR_EACH_CLIENT(self) centerprint(self, "^1RED ^7team wins the round");
-                                       TeamScore_AddToTeam(COLOR_TEAM1, ST_SCORE, +1);
+                                       TeamScore_AddToTeam(FL_TEAM_1, ST_SCORE, +1);
                                }
                                else if(bluealive) {
                                        play2all("ctf/blue_capture.wav");
                                        FOR_EACH_CLIENT(self) centerprint(self, "^4BLUE ^7team wins the round");
-                                       TeamScore_AddToTeam(COLOR_TEAM2, ST_SCORE, +1);
+                                       TeamScore_AddToTeam(FL_TEAM_2, ST_SCORE, +1);
                                }
                                else
                                        FOR_EACH_CLIENT(self) centerprint(self, "^7Round tied");
index 2562dca3df803fa93725204eb01f7059ef1cd189..b4ac4a1eea33ef75b19532a339ac53aa418741a2 100644 (file)
@@ -9,7 +9,7 @@ void spawnfunc_info_player_attacker() {
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM1; // red, gets swapped every round
+       self.team = FL_TEAM_1; // red, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
 
@@ -19,7 +19,7 @@ void spawnfunc_info_player_defender() {
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM2; // blue, gets swapped every round
+       self.team = FL_TEAM_2; // blue, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
 
@@ -216,10 +216,10 @@ void spawnfunc_func_assault_destructible() {
        }
        self.spawnflags = 3;
        self.classname = "func_assault_destructible";
-       if(assault_attacker_team == COLOR_TEAM1) {
-               self.team = COLOR_TEAM2;
+       if(assault_attacker_team == FL_TEAM_1) {
+               self.team = FL_TEAM_2;
        } else {
-               self.team = COLOR_TEAM1;
+               self.team = FL_TEAM_1;
        }
        spawnfunc_func_breakable();
 }
@@ -289,10 +289,10 @@ void assault_roundstart_use() {
        ent = find(world, classname, "turret_main");
        while(ent) {
                // Swap turret teams
-               if(ent.team == COLOR_TEAM1)
-                       ent.team = COLOR_TEAM2;
+               if(ent.team == FL_TEAM_1)
+                       ent.team = FL_TEAM_2;
                else
-                       ent.team = COLOR_TEAM1;
+                       ent.team = FL_TEAM_1;
 
                self = ent;
 
@@ -313,7 +313,7 @@ void spawnfunc_target_assault_roundstart() {
                remove(self);
                return;
        }
-       assault_attacker_team = COLOR_TEAM1;
+       assault_attacker_team = FL_TEAM_1;
        self.classname = "target_assault_roundstart";
        self.use = assault_roundstart_use;
        self.reset2 = assault_roundstart_use;
@@ -351,10 +351,10 @@ void assault_new_round()
        self.winning = self.winning + 1;
 
        // swap attacker/defender roles
-       if(assault_attacker_team == COLOR_TEAM1) {
-               assault_attacker_team = COLOR_TEAM2;
+       if(assault_attacker_team == FL_TEAM_1) {
+               assault_attacker_team = FL_TEAM_2;
        } else {
-               assault_attacker_team = COLOR_TEAM1;
+               assault_attacker_team = FL_TEAM_1;
        }
 
 
@@ -363,10 +363,10 @@ void assault_new_round()
        {
                if(clienttype(ent) == CLIENTTYPE_NOTACLIENT)
                {
-                       if(ent.team_saved == COLOR_TEAM1)
-                               ent.team_saved = COLOR_TEAM2;
-                       else if(ent.team_saved == COLOR_TEAM2)
-                               ent.team_saved = COLOR_TEAM1;
+                       if(ent.team_saved == FL_TEAM_1)
+                               ent.team_saved = FL_TEAM_2;
+                       else if(ent.team_saved == FL_TEAM_2)
+                               ent.team_saved = FL_TEAM_1;
                }
        }
 
index d65d866ca60132011470f2a058dcd407ed2db2f4..9d514da5ac6fe5561c3aa4977169e395d7a72cdd 100644 (file)
@@ -127,10 +127,10 @@ void ctf_flag_spawnstuff()
        self.nearestwaypointtimeout = 0; // activate waypointing again
        self.basewaypoint = self.nearestwaypoint;
 
-       if(self.team == COLOR_TEAM1)
-               WaypointSprite_SpawnFixed("redbase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(COLOR_TEAM1 - 1, FALSE));
+       if(self.team == FL_TEAM_1)
+               WaypointSprite_SpawnFixed("redbase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(FL_TEAM_1 - 1, FALSE));
        else
-               WaypointSprite_SpawnFixed("bluebase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(COLOR_TEAM2 - 1, FALSE));
+               WaypointSprite_SpawnFixed("bluebase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(FL_TEAM_2 - 1, FALSE));
 }
 
 float ctf_score_value(string parameter)
@@ -290,7 +290,7 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker)
        ctf_captureshield_update(p, 0); // shield only
        e.playerid = attacker.playerid;
        e.ctf_droptime = time;
-       WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, COLOR_TEAM1 + COLOR_TEAM2 - e.team, e, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1');
+       WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, FL_TEAM_1 + FL_TEAM_2 - e.team, e, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1');
        WaypointSprite_Ping(e.waypointsprite_attachedforcarrier);
        
        if(p.waypointsprite_attachedforcarrier)
@@ -494,11 +494,11 @@ void FlagTouch()
                UpdateFrags(other, ctf_score_value("score_capture"));
 
                if (autocvar_g_ctf_flag_capture_effects) {
-                       if (other.team == COLOR_TEAM1) { // red team scores effect
+                       if (other.team == FL_TEAM_1) { // red team scores effect
                                pointparticles(particleeffectnum("red_ground_quake"), self.origin, '0 0 0', 1);
                                flag_cap_ring_spawn(self.origin);
                        }
-                       if (other.team == COLOR_TEAM2) { // blue team scores effect
+                       if (other.team == FL_TEAM_2) { // blue team scores effect
                                pointparticles(particleeffectnum("blue_ground_quake"), self.origin, '0 0 0', 1);
                                flag_cap_ring_spawn(self.origin);
                        }
@@ -513,7 +513,7 @@ void FlagTouch()
                other.next_take_time = time + 1;
        }
        if (self.cnt == FLAG_BASE)
-       if (other.team == COLOR_TEAM1 || other.team == COLOR_TEAM2) // only red and blue team can steal flags
+       if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2) // only red and blue team can steal flags
        if (other.team != self.team)
        if (!other.flagcarried)
        if (!other.ctf_captureshielded)
@@ -563,7 +563,7 @@ void FlagTouch()
        if (self.cnt == FLAG_DROPPED)
        {
                self.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk
-               if (other.team == self.team || (other.team != COLOR_TEAM1 && other.team != COLOR_TEAM2))
+               if (other.team == self.team || (other.team != FL_TEAM_1 && other.team != FL_TEAM_2))
                {
                        // return flag
                        Send_KillNotification (other.netname, self.netname, "", INFO_RETURNFLAG, MSG_INFO);
@@ -578,22 +578,22 @@ void FlagTouch()
                                }
 
                        // punish the team who was last carrying it
-                       if(self.team == COLOR_TEAM1)
-                               TeamScore_AddToTeam(COLOR_TEAM2, ST_SCORE, -ctf_score_value("penalty_returned"));
+                       if(self.team == FL_TEAM_1)
+                               TeamScore_AddToTeam(FL_TEAM_2, ST_SCORE, -ctf_score_value("penalty_returned"));
                        else
-                               TeamScore_AddToTeam(COLOR_TEAM1, ST_SCORE, -ctf_score_value("penalty_returned"));
+                               TeamScore_AddToTeam(FL_TEAM_1, ST_SCORE, -ctf_score_value("penalty_returned"));
 
                        // reward the player who returned it
                        if(other.playerid == self.playerid) // is this the guy who killed the FC last?
                        {
-                               if (other.team == COLOR_TEAM1 || other.team == COLOR_TEAM2)
+                               if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2)
                                        UpdateFrags(other, ctf_score_value("score_return_by_killer"));
                                else
                                        UpdateFrags(other, ctf_score_value("score_return_rogue_by_killer"));
                        }
                        else
                        {
-                               if (other.team == COLOR_TEAM1 || other.team == COLOR_TEAM2)
+                               if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2)
                                        UpdateFrags(other, ctf_score_value("score_return"));
                                else
                                        UpdateFrags(other, ctf_score_value("score_return_rogue"));
@@ -663,7 +663,7 @@ void spawnfunc_info_player_team1()
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM1; // red
+       self.team = FL_TEAM_1; // red
        spawnfunc_info_player_deathmatch();
 }
 //self.team = 4;self.classname = "info_player_start";spawnfunc_info_player_start();}
@@ -683,7 +683,7 @@ void spawnfunc_info_player_team2()
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM2; // blue
+       self.team = FL_TEAM_2; // blue
        spawnfunc_info_player_deathmatch();
 }
 //self.team = 13;self.classname = "info_player_start";spawnfunc_info_player_start();}
@@ -703,7 +703,7 @@ void spawnfunc_info_player_team3()
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM3; // yellow
+       self.team = FL_TEAM_3; // yellow
        spawnfunc_info_player_deathmatch();
 }
 
@@ -723,7 +723,7 @@ void spawnfunc_info_player_team4()
                remove(self);
                return;
        }
-       self.team = COLOR_TEAM4; // purple
+       self.team = FL_TEAM_4; // purple
        spawnfunc_info_player_deathmatch();
 }
 
@@ -741,11 +741,11 @@ void item_flag_postspawn()
        // Flag Glow Trail Support
        if(autocvar_g_ctf_flag_glowtrails)
        { // Provide Flag Glow Trail
-               if(self.team == COLOR_TEAM1)
+               if(self.team == FL_TEAM_1)
                        // Red
                        self.glow_color = 251;
                else
-               if(self.team == COLOR_TEAM2)
+               if(self.team == FL_TEAM_2)
                        // Blue
                        self.glow_color = 210;
 
@@ -802,7 +802,7 @@ void spawnfunc_item_flag_team1()
        ctf_worldflaglist = self;
 
        self.classname = "item_flag_team";
-       self.team = COLOR_TEAM1; // color 4 team (red)
+       self.team = FL_TEAM_1; // color 4 team (red)
        self.items = IT_KEY2; // gold key (redish enough)
        self.netname = "^1RED^7 flag";
        self.target = "###item###";
@@ -901,7 +901,7 @@ void spawnfunc_item_flag_team2()
        ctf_worldflaglist = self;
 
        self.classname = "item_flag_team";
-       self.team = COLOR_TEAM2; // color 13 team (blue)
+       self.team = FL_TEAM_2; // color 13 team (blue)
        self.items = IT_KEY1; // silver key (bluish enough)
        self.netname = "^4BLUE^7 flag";
        self.target = "###item###";
@@ -1002,8 +1002,8 @@ void ctf_spawnteams()
 
        numteams = 2;//cvar("g_ctf_default_teams");
 
-       ctf_spawnteam("Red", COLOR_TEAM1 - 1);
-       ctf_spawnteam("Blue", COLOR_TEAM2 - 1);
+       ctf_spawnteam("Red", FL_TEAM_1 - 1);
+       ctf_spawnteam("Blue", FL_TEAM_2 - 1);
 }
 
 void ctf_delayedinit()
@@ -1089,7 +1089,7 @@ void ctf_setstatus()
 entity ctf_team_has_commander(float cteam)
 {
        entity pl;
-       if(cteam != COLOR_TEAM1 || cteam != COLOR_TEAM2)
+       if(cteam != FL_TEAM_1 || cteam != FL_TEAM_2)
                return world;
 
        FOR_EACH_REALPLAYER(pl) {
index 6a0dcdf8b4e01679d23dfd1576c581e2c061e3ce..e0bad53d39f3fecb7975a22d7837d8a6e0db8728 100644 (file)
@@ -131,16 +131,16 @@ void dompoint_captured ()
 
        switch(self.goalentity.team)
        {
-               case COLOR_TEAM1:
+               case FL_TEAM_1:
                        WaypointSprite_UpdateSprites(self.sprite, "dom-red", "", "");
                        break;
-               case COLOR_TEAM2:
+               case FL_TEAM_2:
                        WaypointSprite_UpdateSprites(self.sprite, "dom-blue", "", "");
                        break;
-               case COLOR_TEAM3:
+               case FL_TEAM_3:
                        WaypointSprite_UpdateSprites(self.sprite, "dom-yellow", "", "");
                        break;
-               case COLOR_TEAM4:
+               case FL_TEAM_4:
                        WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", "");
        }
 
@@ -157,16 +157,16 @@ void dompoint_captured ()
                        wait_time = head.wait;
                switch(head.goalentity.team)
                {
-                       case COLOR_TEAM1:
+                       case FL_TEAM_1:
                                pps_red += points/wait_time;
                                break;
-                       case COLOR_TEAM2:
+                       case FL_TEAM_2:
                                pps_blue += points/wait_time;
                                break;
-                       case COLOR_TEAM3:
+                       case FL_TEAM_3:
                                pps_yellow += points/wait_time;
                                break;
-                       case COLOR_TEAM4:
+                       case FL_TEAM_4:
                                pps_pink += points/wait_time;
                }
                total_pps += points/wait_time;
@@ -469,12 +469,12 @@ void dom_spawnteams()
        else
                numteams = autocvar_g_domination_teams_override;
        // LordHavoc: edit this if you want to change defaults
-       dom_spawnteam("Red", COLOR_TEAM1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point");
-       dom_spawnteam("Blue", COLOR_TEAM2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point");
+       dom_spawnteam("Red", FL_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point");
+       dom_spawnteam("Blue", FL_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point");
        if(numteams > 2)
-               dom_spawnteam("Yellow", COLOR_TEAM3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point");
+               dom_spawnteam("Yellow", FL_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point");
        if(numteams > 3)
-               dom_spawnteam("Pink", COLOR_TEAM4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point");
+               dom_spawnteam("Pink", FL_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point");
        dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", "");
 }
 
index a0e4dc097d8585cfc1e88e9f7ffebc0eb9800471..6f267426146f61a0e46426e4986c82fe66bc3c06 100644 (file)
@@ -427,10 +427,10 @@ void nb_spawnteams (void)
        {
                switch(e.team)
                {
-                       case COLOR_TEAM1: if(!t_r) { nb_spawnteam ("Red", e.team-1)   ; t_r = 1; } break;
-                       case COLOR_TEAM2: if(!t_b) { nb_spawnteam ("Blue", e.team-1)  ; t_b = 1; } break;
-                       case COLOR_TEAM3: if(!t_y) { nb_spawnteam ("Yellow", e.team-1); t_y = 1; } break;
-                       case COLOR_TEAM4: if(!t_p) { nb_spawnteam ("Pink", e.team-1)  ; t_p = 1; } break;
+                       case FL_TEAM_1: if(!t_r) { nb_spawnteam ("Red", e.team-1)   ; t_r = 1; } break;
+                       case FL_TEAM_2: if(!t_b) { nb_spawnteam ("Blue", e.team-1)  ; t_b = 1; } break;
+                       case FL_TEAM_3: if(!t_y) { nb_spawnteam ("Yellow", e.team-1); t_y = 1; } break;
+                       case FL_TEAM_4: if(!t_p) { nb_spawnteam ("Pink", e.team-1)  ; t_p = 1; } break;
                }
        }
 }
@@ -541,22 +541,22 @@ void SpawnGoal (void)
 
 void spawnfunc_nexball_redgoal (void)
 {
-       self.team = COLOR_TEAM1;
+       self.team = FL_TEAM_1;
        SpawnGoal();
 }
 void spawnfunc_nexball_bluegoal (void)
 {
-       self.team = COLOR_TEAM2;
+       self.team = FL_TEAM_2;
        SpawnGoal();
 }
 void spawnfunc_nexball_yellowgoal (void)
 {
-       self.team = COLOR_TEAM3;
+       self.team = FL_TEAM_3;
        SpawnGoal();
 }
 void spawnfunc_nexball_pinkgoal (void)
 {
-       self.team = COLOR_TEAM4;
+       self.team = FL_TEAM_4;
        SpawnGoal();
 }
 
index 08a6297ad44cf21e793edfc86e4949bb474dd0e4..1ea2615eadc2e846e807fd074b13fc6954e32e61 100644 (file)
@@ -757,6 +757,7 @@ float autocvar_g_chat_flood_spl_team;
 float autocvar_g_chat_flood_spl_tell;
 float autocvar_g_chat_nospectators;
 float autocvar_g_chat_teamcolors;
+float autocvar_g_chat_tellprivacy;
 float autocvar_g_ctf_allow_vehicle_carry;
 float autocvar_g_ctf_allow_vehicle_touch;
 float autocvar_g_ctf_throw;
@@ -782,7 +783,6 @@ float autocvar_g_ctf_pass_request;
 float autocvar_g_ctf_pass_turnrate;
 float autocvar_g_ctf_pass_timelimit;
 float autocvar_g_ctf_pass_velocity;
-float autocvar_g_ctf_captimerecord_always;
 float autocvar_g_ctf_dynamiclights;
 string autocvar_g_ctf_flag_blue_model;
 float autocvar_g_ctf_flag_blue_skin;
@@ -792,7 +792,6 @@ float autocvar_g_ctf_flag_dropped_waypoint;
 float autocvar_g_ctf_flag_dropped_floatinwater;
 float autocvar_g_ctf_flag_glowtrails;
 float autocvar_g_ctf_flag_health;
-float autocvar_g_ctf_flag_pickup_verbosename;
 string autocvar_g_ctf_flag_red_model;
 float autocvar_g_ctf_flag_red_skin;
 float autocvar_g_ctf_flag_return_time;
@@ -893,7 +892,6 @@ float autocvar_g_keyhunt_teams_override;
 float autocvar_g_lms_campcheck_damage;
 float autocvar_g_lms_campcheck_distance;
 float autocvar_g_lms_campcheck_interval;
-string autocvar_g_lms_campcheck_message;
 float autocvar_g_lms_join_anytime;
 float autocvar_g_lms_last_join;
 #define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
@@ -1163,13 +1161,10 @@ float autocvar_sv_eventlog_files_counter;
 string autocvar_sv_eventlog_files_nameprefix;
 string autocvar_sv_eventlog_files_namesuffix;
 float autocvar_sv_eventlog_files_timestamps;
-float autocvar_sv_fraginfo;
-float autocvar_sv_fraginfo_handicap;
-float autocvar_sv_fraginfo_ping;
-float autocvar_sv_fraginfo_stats;
 float autocvar_sv_friction;
 float autocvar_sv_friction_on_land;
 float autocvar_sv_gameplayfix_q2airaccelerate;
+float autocvar_sv_gentle;
 #define autocvar_sv_gravity cvar("sv_gravity")
 string autocvar_sv_intermission_cdtrack;
 string autocvar_sv_jumpspeedcap_max;
index 45107b833a1b16221b8082da7c55c143d7b9244b..b2e20e776435478bf7454d3eadef79ce5e989e5f 100644 (file)
@@ -398,13 +398,13 @@ void bot_clientconnect()
                bot_setnameandstuff();
 
        if(self.bot_forced_team==1)
-               self.team = COLOR_TEAM1;
+               self.team = FL_TEAM_1;
        else if(self.bot_forced_team==2)
-               self.team = COLOR_TEAM2;
+               self.team = FL_TEAM_2;
        else if(self.bot_forced_team==3)
-               self.team = COLOR_TEAM3;
+               self.team = FL_TEAM_3;
        else if(self.bot_forced_team==4)
-               self.team = COLOR_TEAM4;
+               self.team = FL_TEAM_4;
        else
                JoinBestTeam(self, FALSE, TRUE);
 
@@ -425,13 +425,13 @@ void bot_removefromlargestteam()
        bestcount = 0;
        while (head)
        {
-               if(head.team == COLOR_TEAM1)
+               if(head.team == FL_TEAM_1)
                        thiscount = c1;
-               else if(head.team == COLOR_TEAM2)
+               else if(head.team == FL_TEAM_2)
                        thiscount = c2;
-               else if(head.team == COLOR_TEAM3)
+               else if(head.team == FL_TEAM_3)
                        thiscount = c3;
-               else if(head.team == COLOR_TEAM4)
+               else if(head.team == FL_TEAM_4)
                        thiscount = c4;
                else
                        thiscount = 0;
index 6b0ccaa0d51764431871b3161247290072dae46d..f50a87fc7a97a0ca6121c8212899c60215524c32 100644 (file)
@@ -127,12 +127,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
                        continue;
 
                // Ignore owned controlpoints
-               if(self.team == COLOR_TEAM1)
+               if(self.team == FL_TEAM_1)
                {
                        if( (cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) && !(cp2.isgenneighbor_red || cp2.iscpneighbor_red) )
                                continue;
                }
-               else if(self.team == COLOR_TEAM2)
+               else if(self.team == FL_TEAM_2)
                {
                        if( (cp2.isgenneighbor_red || cp2.iscpneighbor_red) && !(cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) )
                                continue;
index be5138c92d41af91bc93571431ac9f6df2757582..07a6942ae6e537cc0cbc7084fc0d7f7d1069fcec 100644 (file)
@@ -425,12 +425,11 @@ void PutObserverInServer (void)
 
        if(self.killcount != -666) {
                if(g_lms) {
-                       if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0)
-                               bprint ("^4", self.netname, "^4 has no more lives left\n");
+                       if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0 && self.lms_spectate_warning != 2)
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_LMS_NOLIVES, self.netname);
                        else
-                               bprint ("^4", self.netname, "^4 is spectating now\n"); // TODO turn this into a proper forfeit?
-               } else
-                       bprint ("^4", self.netname, "^4 is spectating now\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname);
+               } else { Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname); }
 
                if(self.just_joined == FALSE) {
                        LogTeamchange(self.playerid, -1, 4);
@@ -564,7 +563,7 @@ void FixPlayermodel()
                if(teamplay)
                {
                        string s;
-                       s = Team_ColorNameLowerCase(self.team);
+                       s = Team_ColorName_Lower(self.team);
                        if(s != "neutral")
                        {
                                defaultmodel = cvar_string(strcat("sv_defaultplayermodel_", s));
@@ -699,7 +698,7 @@ void PutClientInServer (void)
                spot = SelectSpawnPoint (FALSE);
                if(!spot)
                {
-                       centerprint(self, "Sorry, no spawnpoints available!\nHope your team can fix it...");
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_NOSPAWNS);
                        return; // spawn failed
                }
 
@@ -881,9 +880,9 @@ void PutClientInServer (void)
 
                if(g_assault) {
                        if(self.team == assault_attacker_team)
-                               centerprint(self, "You are attacking!");
+                               Send_Notification(NOTIF_TEAM, self, MSG_CENTER, CENTER_ASSAULT_ATTACKING);
                        else
-                               centerprint(self, "You are defending!");
+                               Send_Notification(NOTIF_TEAM, self, MSG_CENTER, CENTER_ASSAULT_DEFENDING);
                }
 
                target_voicescript_clear(self);
@@ -1086,7 +1085,7 @@ void ClientKill_Now_TeamChange()
                if(g_ca)
                        self.caplayer = 0;
                if(blockSpectators)
-                       sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
                PutObserverInServer();
        }
        else
@@ -1237,28 +1236,28 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
                        self.killindicator.colormod = '0 0 0';
                        if(clienttype(self) == CLIENTTYPE_REAL)
                        if(self.killindicator.cnt > 0)
-                               Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "^1Suicide in %d seconds", 1, self.killindicator.cnt);
+                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_SUICIDE, self.killindicator.cnt);
                }
                else if(targetteam == -1) // auto
                {
                        self.killindicator.colormod = '0 1 0';
                        if(clienttype(self) == CLIENTTYPE_REAL)
                        if(self.killindicator.cnt > 0)
-                               Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Changing team in %d seconds", 1, self.killindicator.cnt);
+                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_AUTO, self.killindicator.cnt);
                }
                else if(targetteam == -2) // spectate
                {
                        self.killindicator.colormod = '0.5 0.5 0.5';
                        if(clienttype(self) == CLIENTTYPE_REAL)
                        if(self.killindicator.cnt > 0)
-                               Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Spectating in %d seconds", 1, self.killindicator.cnt);
+                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_SPECTATE, self.killindicator.cnt);
                }
                else
                {
-                       self.killindicator.colormod = TeamColor(targetteam);
+                       self.killindicator.colormod = Team_ColorRGB(targetteam);
                        if(clienttype(self) == CLIENTTYPE_REAL)
                        if(self.killindicator.cnt > 0)
-                               Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, strcat("Changing to ", ColoredTeamName(targetteam), " in %d seconds"), 1, self.killindicator.cnt);
+                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, APP_TEAM_NUM_4(targetteam, CENTER_TEAMCHANGE_), self.killindicator.cnt);
                }
        }
 
@@ -1300,7 +1299,7 @@ void FixClientCvars(entity e)
                stuffcmd(e, "cl_cmd settemp cl_movecliptokeyboard 2\n");
        if(autocvar_g_antilag == 3) // client side hitscan
                stuffcmd(e, "cl_cmd settemp cl_prydoncursor_notrace 0\n");
-       if(sv_gentle)
+       if(autocvar_sv_gentle)
                stuffcmd(e, "cl_cmd settemp cl_gentle 1\n");
        /*
         * we no longer need to stuff this. Remove this comment block if you feel
@@ -1349,7 +1348,6 @@ ClientConnect
 Called when a client connects to the server
 =============
 */
-string ColoredTeamName(float t);
 void DecodeLevelParms (void);
 //void dom_player_join_team(entity pl);
 void set_dom_state(entity e);
@@ -1369,7 +1367,7 @@ void ClientConnect (void)
        DecodeLevelParms();
 
 #ifdef WATERMARK
-       sprint(self, strcat("^4SVQC Build information: ^1", WATERMARK, "\n"));
+       Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_WATERMARK, WATERMARK);
 #endif
 
        self.classname = "player_joining";
@@ -1377,6 +1375,16 @@ void ClientConnect (void)
        self.flags = FL_CLIENT;
        self.version_nagtime = time + 10 + random() * 10;
 
+       if(self.netaddress == "local")
+       {
+               //print("^3server is local!\n");
+
+               if(server_is_local)
+                       error("Multiple local clients???");
+               else
+                       server_is_local = TRUE;
+       }
+
        if(player_count<0)
        {
                dprint("BUG player count is lower than zero, this cannot happen!\n");
@@ -1402,30 +1410,30 @@ void ClientConnect (void)
                {
                        switch(autocvar_g_campaign_forceteam)
                        {
-                               case 1: self.team_forced = COLOR_TEAM1; break;
-                               case 2: self.team_forced = COLOR_TEAM2; break;
-                               case 3: self.team_forced = COLOR_TEAM3; break;
-                               case 4: self.team_forced = COLOR_TEAM4; break;
+                               case 1: self.team_forced = FL_TEAM_1; break;
+                               case 2: self.team_forced = FL_TEAM_2; break;
+                               case 3: self.team_forced = FL_TEAM_3; break;
+                               case 4: self.team_forced = FL_TEAM_4; break;
                                default: self.team_forced = 0;
                        }
                }
        }
        else if(PlayerInIDList(self, autocvar_g_forced_team_red))
-               self.team_forced = COLOR_TEAM1;
+               self.team_forced = FL_TEAM_1;
        else if(PlayerInIDList(self, autocvar_g_forced_team_blue))
-               self.team_forced = COLOR_TEAM2;
+               self.team_forced = FL_TEAM_2;
        else if(PlayerInIDList(self, autocvar_g_forced_team_yellow))
-               self.team_forced = COLOR_TEAM3;
+               self.team_forced = FL_TEAM_3;
        else if(PlayerInIDList(self, autocvar_g_forced_team_pink))
-               self.team_forced = COLOR_TEAM4;
+               self.team_forced = FL_TEAM_4;
        else if(autocvar_g_forced_team_otherwise == "red")
-               self.team_forced = COLOR_TEAM1;
+               self.team_forced = FL_TEAM_1;
        else if(autocvar_g_forced_team_otherwise == "blue")
-               self.team_forced = COLOR_TEAM2;
+               self.team_forced = FL_TEAM_2;
        else if(autocvar_g_forced_team_otherwise == "yellow")
-               self.team_forced = COLOR_TEAM3;
+               self.team_forced = FL_TEAM_3;
        else if(autocvar_g_forced_team_otherwise == "pink")
-               self.team_forced = COLOR_TEAM4;
+               self.team_forced = FL_TEAM_4;
        else if(autocvar_g_forced_team_otherwise == "spectate")
                self.team_forced = -1;
        else if(autocvar_g_forced_team_otherwise == "spectator")
@@ -1477,12 +1485,10 @@ void ClientConnect (void)
 
        self.netname_previous = strzone(self.netname);
 
-       bprint("^4", self.netname, "^4 connected");
-
-       if(self.classname != "observer" && (g_domination || g_ctf))
-               bprint(" and joined the ", ColoredTeamName(self.team));
-
-       bprint("\n");
+       if((self.classname == STR_PLAYER && teamplay))
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(self, INFO_JOIN_CONNECT_TEAM_), self.netname);
+       else
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_CONNECT, self.netname);
 
        stuffcmd(self, strcat(clientstuff, "\n"));
        stuffcmd(self, "cl_particles_reloadeffects\n"); // TODO do we still need this?
@@ -1525,7 +1531,7 @@ void ClientConnect (void)
        self.spectatortime = time;
        if(blockSpectators)
        {
-               sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+               Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
        }
 
        self.jointime = time;
@@ -1638,8 +1644,8 @@ void ClientDisconnect (void)
 
        if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":part:", ftos(self.playerid)));
-       bprint ("^4",self.netname);
-       bprint ("^4 disconnected\n");
+               
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname);
 
        DropAllRunes(self);
        MUTATOR_CALLHOOK(ClientDisconnect);
@@ -1810,7 +1816,8 @@ void player_powerups (void)
                                self.alpha = default_player_alpha;
                                self.exteriorweaponentity.alpha = default_weapon_alpha;
                                self.items &~= IT_STRENGTH;
-                               sprint(self, "^3Invisibility has worn off\n");
+                               //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERDOWN_INVISIBILITY, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_INVISIBILITY);
                        }
                }
                else
@@ -1820,7 +1827,8 @@ void player_powerups (void)
                                self.alpha = g_minstagib_invis_alpha;
                                self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
                                self.items |= IT_STRENGTH;
-                               sprint(self, "^3You are invisible\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERUP_INVISIBILITY, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
                        }
                }
 
@@ -1830,7 +1838,8 @@ void player_powerups (void)
                        if (time > self.invincible_finished)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
-                               sprint(self, "^3Speed has worn off\n");
+                               //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERDOWN_SPEED, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SPEED);
                        }
                }
                else
@@ -1838,7 +1847,8 @@ void player_powerups (void)
                        if (time < self.invincible_finished)
                        {
                                self.items = self.items | IT_INVINCIBLE;
-                               sprint(self, "^3You are on speed\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERUP_SPEED, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SPEED);
                        }
                }
        }
@@ -1851,7 +1861,8 @@ void player_powerups (void)
                        if (time > self.strength_finished)
                        {
                                self.items = self.items - (self.items & IT_STRENGTH);
-                               sprint(self, "^3Strength has worn off\n");
+                               //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERDOWN_STRENGTH, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_STRENGTH);
                        }
                }
                else
@@ -1859,7 +1870,8 @@ void player_powerups (void)
                        if (time < self.strength_finished)
                        {
                                self.items = self.items | IT_STRENGTH;
-                               sprint(self, "^3Strength infuses your weapons with devastating power\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERUP_STRENGTH, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_STRENGTH);
                        }
                }
                if (self.items & IT_INVINCIBLE)
@@ -1869,7 +1881,8 @@ void player_powerups (void)
                        if (time > self.invincible_finished)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
-                               sprint(self, "^3Shield has worn off\n");
+                               //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERDOWN_SHIELD, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SHIELD);
                        }
                }
                else
@@ -1877,7 +1890,8 @@ void player_powerups (void)
                        if (time < self.invincible_finished)
                        {
                                self.items = self.items | IT_INVINCIBLE;
-                               sprint(self, "^3Shield surrounds you\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_POWERUP_SHIELD, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SHIELD);
                        }
                }
                if (self.items & IT_SUPERWEAPON)
@@ -1886,7 +1900,8 @@ void player_powerups (void)
                        {
                                self.superweapons_finished = 0;
                                self.items = self.items - (self.items & IT_SUPERWEAPON);
-                               sprint(self, "^3Superweapons have been lost\n");
+                               //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_SUPERWEAPON_LOST, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_SUPERWEAPON_LOST);
                        }
                        else if (self.items & IT_UNLIMITED_SUPERWEAPONS)
                        {
@@ -1899,7 +1914,8 @@ void player_powerups (void)
                                {
                                        self.items = self.items - (self.items & IT_SUPERWEAPON);
                                        WEPSET_ANDNOT_EA(self, WEPBIT_SUPERWEAPONS);
-                                       sprint(self, "^3Superweapons have broken down\n");
+                                       //Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_SUPERWEAPON_BROKEN, self.netname);
+                                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_SUPERWEAPON_BROKEN);
                                }
                        }
                }
@@ -1908,7 +1924,8 @@ void player_powerups (void)
                        if (time < self.superweapons_finished || (self.items & IT_UNLIMITED_SUPERWEAPONS))
                        {
                                self.items = self.items | IT_SUPERWEAPON;
-                               sprint(self, "^3You now have a superweapon\n");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_SUPERWEAPON_PICKUP, self.netname);
+                               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_SUPERWEAPON_PICKUP);
                        }
                        else
                        {
@@ -2329,8 +2346,8 @@ void LeaveSpectatorMode()
 
                        PutClientInServer();
 
-                       if(self.classname == "player")
-                               bprint ("^4", self.netname, "^4 is playing now\n");
+                       if(self.classname == STR_PLAYER)
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
 
                        if(!autocvar_g_campaign)
                        if (time < self.jointime + autocvar_welcome_message_time)
@@ -2338,7 +2355,7 @@ void LeaveSpectatorMode()
 
                        if (self.prevent_join_msgtime)
                        {
-                               Send_CSQC_Centerprint_Generic_Expire(self, CPID_PREVENT_JOIN);
+                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
                                self.prevent_join_msgtime = 0;
                        }
 
@@ -2408,7 +2425,7 @@ float nJoinAllowed(entity ignore) {
 void checkSpectatorBlock() {
        if(self.classname == "spectator" || self.classname == "observer") {
                if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) {
-                       sprint(self, "^7You were kicked from the server because you are spectator and spectators aren't allowed at the moment.\n");
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
                        dropclient(self);
                }
        }
@@ -2595,7 +2612,7 @@ void PlayerPreThink (void)
                                        {
                                                // notify release users if connecting to git
                                                dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
-                                               sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+                                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                        }
                                        else
                                        {
@@ -2605,13 +2622,13 @@ void PlayerPreThink (void)
                                                {
                                                        // give users new version
                                                        dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n"));
+                                                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                                else if(r > 0)
                                                {
                                                        // notify users about old server version
                                                        print("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+                                                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                        }
                                }
@@ -2621,7 +2638,7 @@ void PlayerPreThink (void)
        // GOD MODE info
        if(!(self.flags & FL_GODMODE)) if(self.max_armorvalue)
        {
-               sprint(self, strcat("godmode saved you ", ftos(self.max_armorvalue), " units of damage, cheater!\n"));
+               Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_GODMODE_OFF, self.max_armorvalue);
                self.max_armorvalue = 0;
        }
 
@@ -2777,7 +2794,7 @@ void PlayerPreThink (void)
                                //sprint(self, "distance: ", ftos(self.lms_traveled_distance), "\n");
                                if(self.lms_traveled_distance < autocvar_g_lms_campcheck_distance)
                                {
-                                       centerprint(self, autocvar_g_lms_campcheck_message);
+                                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_CAMPCHECK);
                                        // FIXME KadaverJack: gibbing player here causes playermodel to bounce around, instead of eye.md3
                                        // I wasn't able to find out WHY that happens, so I put a workaround in place that shall prevent players from being gibbed :(
                                        Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
@@ -2976,11 +2993,7 @@ void PlayerPostThink (void)
        {
                if (time - self.parm_idlesince < 1) // instead of (time == self.parm_idlesince) to support sv_maxidle <= 10
                {
-                       if(self.idlekick_lasttimeleft)
-                       {
-                               Send_CSQC_Centerprint_Generic_Expire(self, CPID_DISCONNECT_IDLING);
-                               self.idlekick_lasttimeleft = 0;
-                       }
+                       if(self.idlekick_lasttimeleft) { self.idlekick_lasttimeleft = 0; }
                }
                else
                {
@@ -2989,12 +3002,11 @@ void PlayerPostThink (void)
                        if(timeleft == min(10, sv_maxidle - 1)) // - 1 to support sv_maxidle <= 10
                        {
                                if(!self.idlekick_lasttimeleft)
-                                       Send_CSQC_Centerprint_Generic(self, CPID_DISCONNECT_IDLING, "^3Stop idling!\n^3Disconnecting in %d seconds...", 1, timeleft);
+                                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_DISCONNECT_IDLING, timeleft);
                        }
                        if(timeleft <= 0)
                        {
-                               bprint("^3", self.netname, "^3 was kicked for idling.\n");
-                               AnnounceTo(self, "terminated");
+                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_KICK_IDLING, self.netname);
                                dropclient(self);
                                return;
                        }
index e81b08e58e73094a76f7c8c3e0fc1d84b757140a..cb44da03fe794cada0243885dd44b53f0a974860 100644 (file)
@@ -467,7 +467,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                        {
                                self.pain_finished = time + 0.5;        //Supajoe
 
-                               if(sv_gentle < 1) {
+                               if(autocvar_sv_gentle < 1) {
                                        if(self.classname != "body") // pain anim is BORKED on our ZYMs, FIXME remove this once we have good models
                                        {
                                                if (!self.animstate_override)
@@ -554,7 +554,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                if(valid_damage_for_weaponstats)
                        WeaponStats_LogKill(awep, abot, self.weapon, vbot);
 
-               if(sv_gentle < 1) // TODO make a "gentle" version?
+               if(autocvar_sv_gentle < 1) // TODO make a "gentle" version?
                if(sound_allowed(MSG_BROADCAST, attacker))
                {
                        if(deathtype == DEATH_DROWN)
@@ -696,7 +696,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // set up to fade out later
                SUB_SetFade (self, time + 6 + random (), 1);
 
-               if(sv_gentle > 0 || autocvar_ekg) {
+               if(autocvar_sv_gentle > 0 || autocvar_ekg) {
                        // remove corpse
                        PlayerCorpseDamage (inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force);
                }
@@ -933,17 +933,18 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                        if(sourcecmsgstr != "" && !privatesay)
                                centerprint(source, sourcecmsgstr);
                }
-               else if(privatesay) // private message, between 2 people only, not sent to server console
+               else if(privatesay) // private message, between 2 people only
                {
                        sprint(source, sourcemsgstr);
                        sprint(privatesay, msgstr);
+                       if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled
                        if(cmsgstr != "")
                                centerprint(privatesay, cmsgstr);
                }
                else if(teamsay > 0) // team message, only sent to team mates
                {
                        sprint(source, sourcemsgstr);
-                       //print(msgstr); // send to server console too
+                       dedicated_print(msgstr); // send to server console too
                        if(sourcecmsgstr != "")
                                centerprint(source, sourcecmsgstr);
                        FOR_EACH_REALPLAYER(head) if(head.team == source.team)
@@ -957,7 +958,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                else if(teamsay < 0) // spectator message, only sent to spectators
                {
                        sprint(source, sourcemsgstr);
-                       //print(msgstr); // send to server console too
+                       dedicated_print(msgstr); // send to server console too
                        FOR_EACH_REALCLIENT(head) if(head.classname != "player")
                                if(head != source)
                                        sprint(head, msgstr);
@@ -965,7 +966,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players
                {
                        sprint(source, sourcemsgstr);
-                       //print(msgstr); // send to server console too
+                       dedicated_print(msgstr); // send to server console too
                        FOR_EACH_REALCLIENT(head)
                                if(head != source)
                                        sprint(head, msgstr);
@@ -1147,7 +1148,7 @@ void FakeGlobalSound(string sample, float chan, float voicetype)
                                break;
                        if(!sv_taunt)
                                break;
-                       if(sv_gentle)
+                       if(autocvar_sv_gentle)
                                break;
                        tauntrand = random();
                        msg_entity = self;
@@ -1165,7 +1166,7 @@ void FakeGlobalSound(string sample, float chan, float voicetype)
                                        animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)
                                break;
-                       if(sv_gentle)
+                       if(autocvar_sv_gentle)
                                break;
                        msg_entity = self;
                        if (msg_entity.cvar_cl_voice_directional >= 1)
@@ -1244,7 +1245,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                break;
                        if(!sv_taunt)
                                break;
-                       if(sv_gentle)
+                       if(autocvar_sv_gentle)
                                break;
                        tauntrand = random();
                        FOR_EACH_REALCLIENT(msg_entity)
@@ -1262,7 +1263,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)
                                break;
-                       if(sv_gentle)
+                       if(autocvar_sv_gentle)
                                break;
                        FOR_EACH_REALCLIENT(msg_entity)
                        {
@@ -1310,14 +1311,8 @@ void VoiceMessage(string type, string msg)
                FakeGlobalSound(self.sample, CH_VOICE, voicetype);
 }
 
-void MoveToTeam(entity client, float team_colour, float type, float show_message)
+void MoveToTeam(entity client, float team_colour, float type)
 {
-//     show_message
-//     0 (00) automove centerprint, admin message
-//     1 (01) automove centerprint, no admin message
-//     2 (10) no centerprint, admin message
-//     3 (11) no centerprint, no admin message
-
        float lockteams_backup;
 
        lockteams_backup = lockteams;  // backup any team lock
@@ -1326,14 +1321,9 @@ void MoveToTeam(entity client, float team_colour, float type, float show_message
 
        TeamchangeFrags(client);  // move the players frags
        SetPlayerColors(client, team_colour - 1);  // set the players colour
-       Damage(client, client, client, 100000, ((show_message & 2) ? DEATH_QUIET : DEATH_AUTOTEAMCHANGE), client.origin, '0 0 0');  // kill the player
+       Damage(client, client, client, 100000, DEATH_AUTOTEAMCHANGE, client.origin, '0 0 0');  // kill the player
 
        lockteams = lockteams_backup;  // restore the team lock
 
        LogTeamchange(client.playerid, client.team, type);
-
-       if not(show_message & 1) // admin message
-               sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: You have been moved to the ", Team_ColorNameLowerCase(team_colour), " team\n"));  // send a chat message
-
-       bprint(strcat(client.netname, " joined the ", ColoredTeamName(client.team), "\n"));
 }
index 530646afd2ec8fbb105dc8a080b41dadaaa25d0f..9fe72b829ac4e1e0a2646a633f01f3bdbcb5f074 100644 (file)
@@ -159,7 +159,7 @@ void ClientCommand_join(float request)
                                                
                                                self.classname = "player";
                                                PlayerScore_Clear(self);
-                                               bprint ("^4", self.netname, "^4 is playing now\n");
+                                               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
                                                PutClientInServer();
                                        }
                                        else 
@@ -284,10 +284,10 @@ void ClientCommand_selectteam(float request, float argc)
                                                                
                                                                switch(argv(1))
                                                                {
-                                                                       case "red": selection = COLOR_TEAM1; break;
-                                                                       case "blue": selection = COLOR_TEAM2; break;
-                                                                       case "yellow": selection = COLOR_TEAM3; break;
-                                                                       case "pink": selection = COLOR_TEAM4; break;
+                                                                       case "red": selection = FL_TEAM_1; break;
+                                                                       case "blue": selection = FL_TEAM_2; break;
+                                                                       case "yellow": selection = FL_TEAM_3; break;
+                                                                       case "pink": selection = FL_TEAM_4; break;
                                                                        case "auto": selection = (-1); break;
                                                                        
                                                                        default: selection = 0; break;
@@ -397,6 +397,8 @@ void ClientCommand_spectate(float request)
                                {
                                        if(self.lms_spectate_warning)
                                        {
+                                               // for the forfeit message...
+                                               self.lms_spectate_warning = 2;
                                                // mark player as spectator
                                                PlayerScore_Add(self, SP_LMS_RANK, 666 - PlayerScore_Add(self, SP_LMS_RANK, 0));
                                        }
index 53ad41d3551d0d7de500622a31f224ec87b52ef1..516c6aa5d8fab4148aee264e7f4d9c63569e77f1 100644 (file)
@@ -607,7 +607,7 @@ void CommonCommand_who(float request, entity caller, float argc)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       float total_listed_players, tmp_hours, tmp_minutes, tmp_seconds, is_bot;
+                       float total_listed_players, is_bot;
                        entity tmp_player;
                        
                        float privacy = (caller && autocvar_sv_status_privacy);
@@ -638,22 +638,13 @@ void CommonCommand_who(float request, entity caller, float argc)
                                        tmp_netaddress = tmp_player.netaddress;
                                        tmp_crypto_idfp = tmp_player.crypto_idfp;
                                }
-                               
-                               tmp_hours = tmp_minutes = tmp_seconds = 0;
-                               
-                               tmp_seconds = floor(time - tmp_player.jointime);
-                               tmp_minutes = floor(tmp_seconds / 60);
-                               tmp_hours = floor(tmp_minutes / 60);
-
-                               if(tmp_minutes) { tmp_seconds -= (tmp_minutes * 60); }                          
-                               if(tmp_hours) { tmp_minutes -= (tmp_hours * 60); }
 
                                print_to(caller, sprintf(strreplace(" ", separator, " #%-3d %-20.20s %-5d %-3d %-9s %-16s %s "), 
                                        num_for_edict(tmp_player), 
                                        tmp_player.netname,
                                        tmp_player.ping, 
                                        tmp_player.ping_packetloss, 
-                                       sprintf("%02d:%02d:%02d", tmp_hours, tmp_minutes, tmp_seconds),
+                                       process_time("%02d:%02d:%02d", time - tmp_player.jointime),
                                        tmp_netaddress,
                                        tmp_crypto_idfp));
                                
index 8f3ea869d49e24bcdf0febd74dc5564c1002f7b6..b47197fe03ab07b5d731745c67aba131bd0ed89c 100644 (file)
@@ -972,7 +972,6 @@ void GameCommand_moveplayer(float request, float argc)
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string destination = argv(2);
-                       string notify = argv(3);
                        
                        string successful, t;
                        successful = string_null;
@@ -1017,21 +1016,21 @@ void GameCommand_moveplayer(float request, float argc)
                                                        if(teamplay)
                                                        {
                                                                // set up
-                                                               float team_color;
+                                                               float team_id;
                                                                float save = client.team_forced;
                                                                client.team_forced = 0;
 
                                                                // find the team to move the player to
-                                                               team_color = ColourToNumber(destination);
-                                                               if(team_color == client.team) // already on the destination team
+                                                               team_id = Team_ColorToTeam(destination);
+                                                               if(team_id == client.team) // already on the destination team
                                                                {
                                                                        // keep the forcing undone
-                                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", ColoredTeamName(client.team), (targets ? ", skipping to next player.\n" : ".\n"));
+                                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
                                                                        continue;
                                                                } 
-                                                               else if(team_color == 0)  // auto team
+                                                               else if(team_id == 0)  // auto team
                                                                {
-                                                                       team_color = NumberToTeamNumber(FindSmallestTeam(client, FALSE));
+                                                                       team_id = Team_NumberToTeam(FindSmallestTeam(client, FALSE));
                                                                }
                                                                else
                                                                {
@@ -1040,21 +1039,21 @@ void GameCommand_moveplayer(float request, float argc)
                                                                client.team_forced = save;
                                                                
                                                                // Check to see if the destination team is even available
-                                                               switch(team_color
+                                                               switch(team_id
                                                                {
-                                                                       case COLOR_TEAM1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
-                                                                       case COLOR_TEAM2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
-                                                                       case COLOR_TEAM3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
-                                                                       case COLOR_TEAM4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
+                                                                       case FL_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
+                                                                       case FL_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
+                                                                       case FL_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
+                                                                       case FL_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
                                                                        
                                                                        default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
                                                                }
                                                                
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
-                                                               MoveToTeam(client, team_color, 6, stof(notify));
+                                                               MoveToTeam(client, team_id, 6);
                                                                successful = strcat(successful, (successful ? ", " : ""), client.netname);
-                                                               print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", ColoredTeamName(team_color), ".\n");
+                                                               print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
                                                                continue;
                                                        }
                                                        else
@@ -1084,13 +1083,10 @@ void GameCommand_moveplayer(float request, float argc)
                        print("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd moveplayer clients destination [notify]\n");
+                       print("\nUsage:^3 sv_cmd moveplayer clients destination\n");
                        print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
                        print("  'destination' is what to send the player to, be it team or spectating\n");
                        print("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
-                       print("  'notify' is whether or not to send messages notifying of the move. Detail below.\n");
-                       print("    0 (00) automove centerprint, admin message; 1 (01) automove centerprint, no admin message\n");
-                       print("    2 (10) no centerprint, admin message; 3 (11) no centerprint, no admin message\n");
                        print("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
                        print("          sv_cmd moveplayer 2 spec \n");
                        print("See also: ^2allspec, shuffleteams^7\n");
@@ -1112,7 +1108,7 @@ void GameCommand_nospectators(float request)
                                if(plr.classname == "spectator" || plr.classname == "observer")
                                {
                                        plr.spectatortime = time;
-                                       sprint(plr, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+                                       Send_Notification(NOTIF_ONE_ONLY, plr, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
                                }
                        }
                        bprint(strcat("^7All spectators will be automatically kicked when not joining the game after ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds!\n"));
@@ -1354,7 +1350,7 @@ void GameCommand_shuffleteams(float request)
                                        x = (t_players / t_teams);
                                        x = ((i == 1) ? ceil(x) : floor(x));
                                        
-                                       team_color = NumberToTeamNumber(i);
+                                       team_color = Team_NumberToTeam(i);
                                        
                                        // sort through the random list of players made earlier 
                                        for(z = 1; z <= maxclients; ++z)
@@ -1368,7 +1364,7 @@ void GameCommand_shuffleteams(float request)
                                                                self = edict_num(shuffleteams_players[z]);
 
                                                        if(self.team != team_color) 
-                                                               MoveToTeam(self, team_color, 6, 0);
+                                                               MoveToTeam(self, team_color, 6);
 
                                                        shuffleteams_players[z] = 0;
                                                        shuffleteams_teams[i] = shuffleteams_teams[i] + 1;
@@ -1413,7 +1409,7 @@ void GameCommand_stuffto(float request, float 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,
        // we can be certain they understand the risks of it... So to enable, compile server with -DSTUFFTO_ENABLED argument.
-       
+
        #ifdef STUFFTO_ENABLED
        #message "stuffto command enabled"
        switch(request)
index aec1e3256b020878305579b179dfeea42a18e67e..522bb2ffca0dc94174ef97e50321431a9c113e62 100644 (file)
@@ -106,6 +106,7 @@ float       TE_KNIGHTSPIKE                          = 8;
 float  TE_LIGHTNING3                           = 9;
 float  TE_LAVASPLASH                           = 10;
 float  TE_TELEPORT                             = 11;
+float TE_BEAM                                  = 13;           // grappling hook
 
 float  UPDATE_GENERAL                          = 0;
 float  UPDATE_STATIC                           = 1;
@@ -139,14 +140,6 @@ float      MSG_ENTITY                              = 5; // csqc
 
 //float        POWERUP_INVINCIBLE_TAKEDAMAGE           = 0.2; // received damage multiplier for invincible powerup
 
-
-float TE_BEAM                                  = 13;           // grappling hook
-
-float COLOR_TEAM1      = 5;  // red
-float COLOR_TEAM2      = 14; // blue
-float COLOR_TEAM3      = 13; // yellow
-float COLOR_TEAM4      = 10; // pink
-
 float NUM_PLAYERSKINS_TEAMPLAY = 3;
 
 float ASSAULT_VALUE_INACTIVE = 1000;
index 2f3eeaa4f3994f3f976dc1fc567dd21efaebb6e7..71fda2ea983ae47d4138f2b6e3e25b28a81fd082 100644 (file)
@@ -39,7 +39,6 @@ float g_pickup_respawntimejitter_powerup;
 float g_jetpack;
 
 float sv_clones;
-float sv_gentle;
 float sv_foginterval;
 
 entity activator;
@@ -58,6 +57,8 @@ float team1_score, team2_score, team3_score, team4_score;
 
 float maxclients;
 
+float server_is_local; // innocent until proven guilty by ClientConnect() in cl_client.qc
+
 // Fields
 
 .void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage;
index e779ff45357bce54c3907b5aced103c70b308738..11ec340d0d78681d4666f16e1e1598907aaea7b6 100644 (file)
@@ -216,7 +216,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                UpdateFrags(attacker, f);
 }
 
-string Obituary_ExtraFragInfo(entity player) // Extra fragmessage information
+/*string Obituary_ExtraFragInfo(entity player) // Extra fragmessage information
 {
        string health_output = string_null;
        string ping_output = string_null;
@@ -252,7 +252,7 @@ string Obituary_ExtraFragInfo(entity player) // Extra fragmessage information
        }
        
        return output;
-}
+}*/
 
 string AppendItemcodes(string s, entity player)
 {
@@ -286,7 +286,7 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
        s = strcat(":kill:", mode);
        s = strcat(s, ":", ftos(killer.playerid));
        s = strcat(s, ":", ftos(killed.playerid));
-       s = strcat(s, ":type=", ftos(deathtype));
+       s = strcat(s, ":type=", Deathtype_Name(deathtype));
        s = strcat(s, ":items=");
        s = AppendItemcodes(s, killer);
        if(killed != killer)
@@ -297,225 +297,265 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
        GameLogEcho(s);
 }
 
-void Send_KillNotification (string s1, string s2, string s3, float msg, float type)
-{
-       WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
-       WriteByte(MSG_BROADCAST, TE_CSQC_KILLNOTIFY);
-       WriteString(MSG_BROADCAST, s1);
-       WriteString(MSG_BROADCAST, s2);
-       WriteString(MSG_BROADCAST, s3);
-       WriteShort(MSG_BROADCAST, msg);
-       WriteByte(MSG_BROADCAST, type);
-}
+#define INFO_NO_MSG 0
 
-// Function is used to send a generic centerprint whose content CSQC gets to decide (gentle version or not in the below cases)
-void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float type)
+void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, string s1, string s2, string s3, float f1, float f2, float f3)
 {
-       if (clienttype(e) == CLIENTTYPE_REAL)
+       float handled = 0, hits = 0;
+       if(DEATH_ISSPECIAL(deathtype))
        {
-               msg_entity = e;
-               WRITESPECTATABLE_MSG_ONE({
-                       WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_KILLCENTERPRINT);
-                       WriteString(MSG_ONE, s1);
-                       WriteString(MSG_ONE, s2);
-                       WriteShort(MSG_ONE, msg);
-                       WriteByte(MSG_ONE, type);
-               });
+               #define DEATHTYPE(name,msg_death,msg_death_by,position) \
+                       { if(deathtype == max(0, name)) \
+                       { \
+                               #if msg_death != NO_MSG \
+                                       if not(murder) \
+                                       { \
+                                               Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_DEATH, msg_death, s1, s2, s3, "", f1, f2, f3, 0); \
+                                               Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death, s1, s2, s3, "", f1, f2, f3, 0); \
+                                               ++handled; \
+                                       } \
+                               #endif \
+                               #if msg_death_by != NO_MSG \
+                                       if(murder) \
+                                       { \
+                                               Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_DEATH, msg_death_by, s1, s2, s3, "", f1, f2, f3, 0); \
+                                               Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death_by, s1, s2, s3, "", f1, f2, f3, 0); \
+                                               ++handled; \
+                                       } \
+                               #endif \
+                               ++hits; \
+                       } }
+
+               DEATHTYPES
+               #undef DEATHTYPE
+               
+               if not(hits)
+               {
+                       backtrace("Obituary_SpecialDeath(): Unhandled deathtype- Please notify Samual!\n");
+               }
+               if not(handled)
+               {
+                       dprint(sprintf("Obituary_SpecialDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification!\n", Deathtype_Name(deathtype), deathtype));
+                       return;
+               }
        }
 }
 
-void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
+float w_deathtype;
+float Obituary_WeaponDeath(entity notif_target, float murder, float deathtype, string s1, string s2, string s3, float f1, float f2)
 {
-       string  s, a, msg;
-       float type;
+       float death_weapon = DEATH_WEAPONOF(deathtype);
 
-       if (targ.classname == "player")
+       if(death_weapon)
        {
-               s = targ.netname;
-               a = attacker.netname;
+               w_deathtype = deathtype;
+               float death_message = weapon_action(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
+               w_deathtype = FALSE;
 
-               if (targ == attacker) // suicides
+               if(death_message)
                {
-                       if (deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
-                               msg = ColoredTeamName(targ.team); // TODO: check if needed?
-                       else
-                               msg = "";
-            if(!g_cts) // no "killed your own dumb self" message in CTS
-                Send_CSQC_KillCenterprint(targ, msg, "", deathtype, MSG_SUICIDE);
+                       Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_WEAPON, death_message, s1, s2, s3, "", f1, f2, 0, 0);
+                       Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, msg_weapon_notifs[death_message - 1].nent_msginfo.nent_id, s1, s2, s3, "", f1, f2, 0, 0);
+                       //print(Get_Field_Value(F_INFVAL, MSG_WEAPON, death_message), "\n");
+               }
+               else { dprint(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); }
+
+               return TRUE;
+       }
+       return FALSE;
+}
+
+void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
+{
+       // Sanity check
+       if not(targ.classname == STR_PLAYER) { backtrace("Obituary called on non-player?!\n"); return; }
+
+       // Declarations
+       float notif_firstblood = FALSE;
+       string deathlocation = NearestLocation(targ.origin);
 
-                       if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
+       //dprint(sprintf("Obituary(): Deathtype = %s (%d), Attacker = %s, Inflictor = %s, Target = %s...\n", Deathtype_Name(deathtype), deathtype, attacker.netname, inflictor.netname, targ.netname));
+
+       // =======
+       // SUICIDE
+       // =======
+       if(targ == attacker)
+       {
+               if(DEATH_ISSPECIAL(deathtype))
+               {
+                       if(deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
                        {
-                               LogDeath("suicide", deathtype, targ, targ);
-                               GiveFrags(attacker, targ, -1, deathtype);
+                               Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.team, 0, 0);
                        }
-
-                       if (targ.killcount > 2)
-                               msg = ftos(targ.killcount);
                        else
-                               msg = "";
-                       if(teamplay && deathtype == DEATH_MIRRORDAMAGE)
                        {
-                               if(attacker.team == COLOR_TEAM1)
-                                       deathtype = KILL_TEAM_RED;
-                               else
-                                       deathtype = KILL_TEAM_BLUE;
+                               switch(deathtype)
+                               {
+                                       case DEATH_MIRRORDAMAGE:
+                                       {
+                                               Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+                                               break;
+                                       }
+                                       
+                                       default:
+                                       {
+                                               Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+                                               break;
+                                       }
+                               }
+                               LogDeath("suicide", deathtype, targ, targ);
+                               GiveFrags(attacker, targ, -1, deathtype);
                        }
-
-                       Send_KillNotification(s, msg, "", deathtype, MSG_SUICIDE);
                }
-               else if (attacker.classname == "player")
+               else if not(Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0))
                {
-                       if(!IsDifferentTeam(attacker, targ))
-                       {
-                               if(attacker.team == COLOR_TEAM1)
-                                       type = KILL_TEAM_RED;
-                               else
-                                       type = KILL_TEAM_BLUE;
-
-                               GiveFrags(attacker, targ, -1, deathtype);
+                       backtrace("SUICIDE: what the hell happened here?\n");
+               }
+       }
 
-                               Send_CSQC_KillCenterprint(attacker, s, "", type, MSG_KILL);
+       // ======
+       // MURDER
+       // ======
+       else if(attacker.classname == "player")
+       {
+               if(!IsDifferentTeam(attacker, targ))
+               {
+                       LogDeath("tk", deathtype, attacker, targ);
+                       GiveFrags(attacker, targ, -1, deathtype);
 
-                               if (targ.killcount > 2)
-                                       msg = ftos(targ.killcount);
-                               else
-                                       msg = "";
+                       attacker.killcount = 0;
+                       
+                       Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAG, targ.netname);
+                       Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAGGED, attacker.netname);
+                       Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), targ.netname, attacker.netname, targ.killcount);
 
-                               if (attacker.killcount > 2) {
-                                       msg = ftos(attacker.killcount);
-                                       type = KILL_TEAM_SPREE;
+                       // In this case, the death message will ALWAYS be "foo was betrayed by bar"
+                       // No need for specific death/weapon messages...
+               }
+               else
+               {
+                       LogDeath("frag", deathtype, attacker, targ);
+                       GiveFrags(attacker, targ, 1, deathtype);
+
+                       attacker.taunt_soundtime = time + 1;
+                       attacker.killcount = attacker.killcount + 1;
+
+                       #define SPREE_ITEM(counta,countb,center,normal,gentle) \
+                               case counta: \
+                               { \
+                                       AnnounceTo(attacker, strcat(#countb, "kills")); \
+                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_##counta, 1); \
+                                       break; \
                                }
-                               Send_KillNotification(a, s, msg, type, MSG_KILL);
+                       switch(attacker.killcount)
+                       {
+                               KILL_SPREE_LIST
+                               default: break;
+                       }
+                       #undef SPREE_ITEM
 
-                               attacker.killcount = 0;
+                       if(!checkrules_firstblood)
+                       {
+                               checkrules_firstblood = TRUE;
+                               notif_firstblood = TRUE; // modify the current messages so that they too show firstblood information
+                               PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
+                               PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
+                       }
 
-                               LogDeath("tk", deathtype, attacker, targ);
+                       float kill_count_to_attacker;
+                       float kill_count_to_target;
+                       if(notif_firstblood)
+                       {
+                               kill_count_to_attacker = -1;
+                               kill_count_to_target = -2;
                        }
                        else
                        {
-                               if (!checkrules_firstblood)
-                               {
-                                       checkrules_firstblood = TRUE;
-                                       Send_KillNotification(a, "", "", KILL_FIRST_BLOOD, MSG_KILL);
-                                       // TODO: make these print a newline if they dont
-                                       Send_CSQC_KillCenterprint(attacker, "", "", KILL_FIRST_BLOOD, MSG_KILL);
-                                       Send_CSQC_KillCenterprint(targ, "", "", KILL_FIRST_VICTIM, MSG_KILL);
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
-                                       PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
-                               }
-
-                               if(targ.istypefrag) {
-                                       Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_TYPEFRAG, MSG_KILL);
-                                       Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_TYPEFRAGGED, MSG_KILL);
-                               } else {
-                                       Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_FRAG, MSG_KILL);
-                                       Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_FRAGGED, MSG_KILL);
-                               }
-
-                               attacker.taunt_soundtime = time + 1;
+                               kill_count_to_attacker = attacker.killcount;
+                               kill_count_to_target = 0;
+                       }
 
-                               if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
-                                       msg = inflictor.message2;
-                               else if (deathtype == DEATH_CUSTOM)
-                                       msg = deathmessage;
+                       if(targ.istypefrag)
+                       {
+                               if(attacker.FRAG_VERBOSE)
+                                       Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE, targ.netname, kill_count_to_attacker, (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping));
                                else
-                                       msg = "";
+                                       Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG, targ.netname, kill_count_to_attacker);
 
-                               if(strstrofs(msg, "%", 0) < 0)
-                                       msg = strcat("%s ", msg, " by %s");
-
-                               Send_KillNotification(a, s, msg, deathtype, MSG_KILL);
+                               if(targ.FRAG_VERBOSE)
+                                       Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE, attacker.netname, kill_count_to_target, attacker.health, attacker.armorvalue, (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping));
+                               else
+                                       Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED, attacker.netname, kill_count_to_target);
+                       }
+                       else
+                       {
+                               if(attacker.FRAG_VERBOSE)
+                                       Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_FRAG_VERBOSE, targ.netname, kill_count_to_attacker, (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping));
+                               else
+                                       Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_MURDER_FRAG, targ.netname, kill_count_to_attacker);
 
-                               GiveFrags(attacker, targ, 1, deathtype);
+                               if(targ.FRAG_VERBOSE)
+                                       Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED_VERBOSE, attacker.netname, kill_count_to_target, attacker.health, attacker.armorvalue, (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping));
+                               else
+                                       Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED, attacker.netname, kill_count_to_target);
+                       }
 
-                               if (targ.killcount > 2) {
-                                       Send_KillNotification(s, ftos(targ.killcount), a, KILL_END_SPREE, MSG_SPREE);
-                               }
+                       if not(Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
+                               Obituary_SpecialDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0);
+               }
+       }
 
-                               attacker.killcount = attacker.killcount + 1;
+       // =============
+       // ACCIDENT/TRAP
+       // =============
+       else
+       {
+               switch(deathtype)
+               {
+                       // For now, we're just forcing HURTTRIGGER to behave as "DEATH_VOID" and giving it no special options...
+                       // Later on you will only be able to make custom messages using DEATH_CUSTOM,
+                       // and there will be a REAL DEATH_VOID implementation which mappers will use.
+                       /*case DEATH_HURTTRIGGER:
+                       {
+                               s1 = targ.netname;
+                               s2 = inflictor.message;
+                               if(strstrofs(s2, "%", 0) < 0) { s2 = strcat("%s ", s2); }
+                               break;
+                       }*/
 
-                               if (attacker.killcount == 3)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE);
-                                       AnnounceTo(attacker, "03kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3, 1);
-                               }
-                               else if (attacker.killcount == 5)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_5, MSG_SPREE);
-                                       AnnounceTo(attacker, "05kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5, 1);
-                               }
-                               else if (attacker.killcount == 10)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_10, MSG_SPREE);
-                                       AnnounceTo(attacker, "10kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10, 1);
-                               }
-                               else if (attacker.killcount == 15)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_15, MSG_SPREE);
-                                       AnnounceTo(attacker, "15kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15, 1);
-                               }
-                               else if (attacker.killcount == 20)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_20, MSG_SPREE);
-                                       AnnounceTo(attacker, "20kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20, 1);
-                               }
-                               else if (attacker.killcount == 25)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_25, MSG_SPREE);
-                                       AnnounceTo(attacker, "25kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25, 1);
-                               }
-                               else if (attacker.killcount == 30)
-                               {
-                                       Send_KillNotification(a, "", "", KILL_SPREE_30, MSG_SPREE);
-                                       AnnounceTo(attacker, "30kills");
-                                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30, 1);
-                               }
-                               else if (attacker.killcount > 2) {
-                                       Send_KillNotification(a, ftos(attacker.killcount), "", KILL_SPREE, MSG_SPREE);
-                               }
-                               LogDeath("frag", deathtype, attacker, targ);
+                       case DEATH_CUSTOM:
+                       {
+                               Obituary_SpecialDeath(targ, FALSE, deathtype,
+                                       targ.netname,
+                                       ((strstrofs(deathmessage, "%", 0) < 0) ? strcat("%s ", deathmessage) : deathmessage),
+                                       deathlocation,
+                                       targ.killcount,
+                                       0,
+                                       0);
+                               break;
                        }
-               }
-               else
-               {
-                       Send_CSQC_KillCenterprint(targ, "", "", deathtype, MSG_KILL_ACTION);
-                       if (deathtype == DEATH_HURTTRIGGER && inflictor.message != "")
-                               msg = inflictor.message;
-                       else if (deathtype == DEATH_CUSTOM)
-                               msg = deathmessage;
-                       else
-                               msg = "";
-                       if(strstrofs(msg, "%", 0) < 0)
-                               msg = strcat("%s ", msg);
-
-                       GiveFrags(targ, targ, -1, deathtype);
-                       if(PlayerScore_Add(targ, SP_SCORE, 0) == -5) {
-                               AnnounceTo(targ, "botlike");
-                               PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_BOTLIKE, 1);
+                       
+                       default:
+                       {
+                               Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
+                               break;
                        }
-                       Send_KillNotification(s, msg, "", deathtype, MSG_KILL_ACTION);
-
-                       if (targ.killcount > 2)
-                               Send_KillNotification(s, ftos(targ.killcount), "", 0, MSG_KILL_ACTION_SPREE);
-
-                       LogDeath("accident", deathtype, targ, targ);
                }
 
-               targ.death_origin = targ.origin;
-               if(targ != attacker)
-                       targ.killer_origin = attacker.origin;
+               LogDeath("accident", deathtype, targ, targ);
+               GiveFrags(targ, targ, -1, deathtype);
 
-               // FIXME: this should go in PutClientInServer
-               if (targ.killcount)
-                       targ.killcount = 0;
+               if(PlayerScore_Add(targ, SP_SCORE, 0) == -5)
+               {
+                       AnnounceTo(targ, "botlike");
+                       PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_BOTLIKE, 1);
+               }
        }
+
+       // Set final information for the death
+       targ.death_origin = targ.origin;
+       if(targ != attacker) { targ.killer_origin = attacker.origin; }
+       if(targ.killcount) { targ.killcount = 0; }
 }
 
 // these are updated by each Damage call for use in button triggering and such
@@ -560,7 +600,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        }
        }
 
-       if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE || deathtype == DEATH_QUIET)
+       if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
        {
                // These are ALWAYS lethal
                // No damage modification here
index d67ef26eba5ca4904655eab2fb73fd0e0c08f549..4589639cd721ad157b7ee73368dac512d783f58f 100644 (file)
@@ -550,6 +550,8 @@ void spawnfunc___init_dedicated_server(void)
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
+       CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
+       CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
 
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
@@ -596,6 +598,8 @@ void spawnfunc_worldspawn (void)
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
+       CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
+       CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
 
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
 
@@ -1672,20 +1676,8 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
        tl = autocvar_timelimit;
        tl += autocvar_timelimit_overtime;
        cvar_set("timelimit", ftos(tl));
-       string minutesPlural;
-       if (autocvar_timelimit_overtime == 1)
-               minutesPlural = " ^3minute";
-       else
-               minutesPlural = " ^3minutes";
-
-       bcenterprint(
-               strcat(
-                       "^3Now playing ^1OVERTIME^3!\n\n^3Added ^1",
-                       ftos(autocvar_timelimit_overtime),
-                       minutesPlural,
-                       " to the game!"
-               )
-       );
+
+       Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime);
 }
 
 float GetWinningCode(float fraglimitreached, float equality)
@@ -1753,10 +1745,10 @@ float WinningCondition_Onslaught()
        {
                if (head.health > 0)
                {
-                       if (head.team == COLOR_TEAM1) t1 = 1;
-                       if (head.team == COLOR_TEAM2) t2 = 1;
-                       if (head.team == COLOR_TEAM3) t3 = 1;
-                       if (head.team == COLOR_TEAM4) t4 = 1;
+                       if (head.team == FL_TEAM_1) t1 = 1;
+                       if (head.team == FL_TEAM_2) t2 = 1;
+                       if (head.team == FL_TEAM_3) t3 = 1;
+                       if (head.team == FL_TEAM_4) t4 = 1;
                }
                head = find(head, classname, "onslaught_generator");
        }
@@ -1764,10 +1756,10 @@ float WinningCondition_Onslaught()
        {
                // game over, only one team remains (or none)
                ClearWinners();
-               if (t1) SetWinners(team, COLOR_TEAM1);
-               if (t2) SetWinners(team, COLOR_TEAM2);
-               if (t3) SetWinners(team, COLOR_TEAM3);
-               if (t4) SetWinners(team, COLOR_TEAM4);
+               if (t1) SetWinners(team, FL_TEAM_1);
+               if (t2) SetWinners(team, FL_TEAM_2);
+               if (t3) SetWinners(team, FL_TEAM_3);
+               if (t4) SetWinners(team, FL_TEAM_4);
                dprint("Have a winner, ending game.\n");
                return WINNING_YES;
        }
@@ -1805,13 +1797,13 @@ float WinningCondition_Assault()
 
        status = WINNING_NO;
        // as the timelimit has not yet passed just assume the defending team will win
-       if(assault_attacker_team == COLOR_TEAM1)
+       if(assault_attacker_team == FL_TEAM_1)
        {
-               SetWinners(team, COLOR_TEAM2);
+               SetWinners(team, FL_TEAM_2);
        }
        else
        {
-               SetWinners(team, COLOR_TEAM1);
+               SetWinners(team, FL_TEAM_1);
        }
 
        entity ent;
@@ -1937,10 +1929,10 @@ float WinningCondition_Scores(float limit, float leadlimit)
 
        if(teamplay)
        {
-               team1_score = TeamScore_GetCompareValue(COLOR_TEAM1);
-               team2_score = TeamScore_GetCompareValue(COLOR_TEAM2);
-               team3_score = TeamScore_GetCompareValue(COLOR_TEAM3);
-               team4_score = TeamScore_GetCompareValue(COLOR_TEAM4);
+               team1_score = TeamScore_GetCompareValue(FL_TEAM_1);
+               team2_score = TeamScore_GetCompareValue(FL_TEAM_2);
+               team3_score = TeamScore_GetCompareValue(FL_TEAM_3);
+               team4_score = TeamScore_GetCompareValue(FL_TEAM_4);
        }
 
        ClearWinners();
@@ -2056,25 +2048,25 @@ float WinningCondition_RanOutOfSpawns()
 
        FOR_EACH_PLAYER(head) if(head.deadflag == DEAD_NO)
        {
-               if(head.team == COLOR_TEAM1)
+               if(head.team == FL_TEAM_1)
                        team1_score = 1;
-               else if(head.team == COLOR_TEAM2)
+               else if(head.team == FL_TEAM_2)
                        team2_score = 1;
-               else if(head.team == COLOR_TEAM3)
+               else if(head.team == FL_TEAM_3)
                        team3_score = 1;
-               else if(head.team == COLOR_TEAM4)
+               else if(head.team == FL_TEAM_4)
                        team4_score = 1;
        }
 
        for(head = world; (head = find(head, classname, "info_player_deathmatch")) != world; )
        {
-               if(head.team == COLOR_TEAM1)
+               if(head.team == FL_TEAM_1)
                        team1_score = 1;
-               else if(head.team == COLOR_TEAM2)
+               else if(head.team == FL_TEAM_2)
                        team2_score = 1;
-               else if(head.team == COLOR_TEAM3)
+               else if(head.team == FL_TEAM_3)
                        team3_score = 1;
-               else if(head.team == COLOR_TEAM4)
+               else if(head.team == FL_TEAM_4)
                        team4_score = 1;
        }
 
@@ -2088,20 +2080,20 @@ float WinningCondition_RanOutOfSpawns()
        {
                float t, i;
                if(team1_score)
-                       t = COLOR_TEAM1;
+                       t = FL_TEAM_1;
                else if(team2_score)
-                       t = COLOR_TEAM2;
+                       t = FL_TEAM_2;
                else if(team3_score)
-                       t = COLOR_TEAM3;
+                       t = FL_TEAM_3;
                else // if(team4_score)
-                       t = COLOR_TEAM4;
+                       t = FL_TEAM_4;
                CheckAllowedTeams(world);
                for(i = 0; i < MAX_TEAMSCORE; ++i)
                {
-                       if(t != COLOR_TEAM1) if(c1 >= 0) TeamScore_AddToTeam(COLOR_TEAM1, i, -1000);
-                       if(t != COLOR_TEAM2) if(c2 >= 0) TeamScore_AddToTeam(COLOR_TEAM2, i, -1000);
-                       if(t != COLOR_TEAM3) if(c3 >= 0) TeamScore_AddToTeam(COLOR_TEAM3, i, -1000);
-                       if(t != COLOR_TEAM4) if(c4 >= 0) TeamScore_AddToTeam(COLOR_TEAM4, i, -1000);
+                       if(t != FL_TEAM_1) if(c1 >= 0) TeamScore_AddToTeam(FL_TEAM_1, i, -1000);
+                       if(t != FL_TEAM_2) if(c2 >= 0) TeamScore_AddToTeam(FL_TEAM_2, i, -1000);
+                       if(t != FL_TEAM_3) if(c3 >= 0) TeamScore_AddToTeam(FL_TEAM_3, i, -1000);
+                       if(t != FL_TEAM_4) if(c4 >= 0) TeamScore_AddToTeam(FL_TEAM_4, i, -1000);
                }
 
                AddWinners(team, t);
@@ -2191,9 +2183,9 @@ void CheckRules_World()
                {
                        checkrules_suddendeathwarning = TRUE;
                        if(g_race && !g_race_qualifying)
-                               bcenterprint("^3Everyone, finish your lap! The race is over!");
+                               Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_RACE_FINISHLAP);
                        else
-                               bcenterprint("^3Now playing ^1OVERTIME^3!\n\n^3Keep fragging until we have a ^1winner^3!");
+                               Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_FRAG);
                }
        }
        else
index e3689cc3d3337d7ced4df19b02ab9c6053b50697..1fd1aa1d16f0753ec0ab5d3b7f4729c15b3f3a3b 100644 (file)
@@ -32,7 +32,6 @@ void WarpZone_crosshair_trace(entity pl)
 void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints
 void() spawnpoint_use;
 string GetMapname();
-string ColoredTeamName(float t);
 
 string admin_name(void)
 {
@@ -80,26 +79,27 @@ float DistributeEvenly_GetRandomized(float weight)
 
 #define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e)
 
-
 string STR_PLAYER = "player";
 string STR_SPECTATOR = "spectator";
 string STR_OBSERVER = "observer";
 
-#if 0
-#define FOR_EACH_CLIENT(v) for(v = world; (v = findflags(v, flags, FL_CLIENT)) != world; )
-#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(clienttype(v) == CLIENTTYPE_REAL)
-#define FOR_EACH_PLAYER(v) for(v = world; (v = find(v, classname, STR_PLAYER)) != world; )
-#define FOR_EACH_REALPLAYER(v) FOR_EACH_PLAYER(v) if(clienttype(v) == CLIENTTYPE_REAL)
-#else
+#define IS_PLAYER(v)                   (v.classname == STR_PLAYER)
+#define IS_SPEC(v)                             (v.classname == STR_SPECTATOR)
+#define IS_OBSERVER(v)                         (v.classname == STR_OBSERVER)
+#define IS_CLIENT(v)                   (v.flags & FL_CLIENT)
+#define IS_BOT_CLIENT(v)               (clienttype(v) == CLIENTTYPE_BOT)
+#define IS_REAL_CLIENT(v)              (clienttype(v) == CLIENTTYPE_REAL)
+#define IS_NOT_A_CLIENT(v)             (clienttype(v) == CLIENTTYPE_NOTACLIENT)
+
 #define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); )
-#define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(v.flags & FL_CLIENT)
-#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(clienttype(v) == CLIENTTYPE_REAL)
-#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(v.classname == STR_PLAYER)
-#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if(v.classname != STR_PLAYER)
-#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(v.classname == STR_PLAYER)
-#endif
+#define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v))
+#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))
+
+#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v))
+#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
+#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
 
-#define CENTER_OR_VIEWOFS(ent) (ent.origin + ((ent.classname == STR_PLAYER) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
+#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
 
 // copies a string to a tempstring (so one can strunzone it)
 string strcat1(string s) = #115; // FRIK_FILE
@@ -107,15 +107,6 @@ string strcat1(string s) = #115; // FRIK_FILE
 float logfile_open;
 float logfile;
 
-void bcenterprint(string s)
-{
-    // TODO replace by MSG_ALL (would show it to spectators too, though)?
-    entity head;
-    FOR_EACH_PLAYER(head)
-    if (clienttype(head) == CLIENTTYPE_REAL)
-        centerprint(head, s);
-}
-
 void GameLogEcho(string s)
 {
     string fn;
@@ -546,7 +537,11 @@ void GetCvars(float f)
 
        get_cvars_f = f;
        get_cvars_s = s;
+
        MUTATOR_CALLHOOK(GetCvars);
+
+       Notification_GetCvars();
+
        GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch");
        GetCvars_handleFloat(s, f, cvar_cl_autoscreenshot, "cl_autoscreenshot");
        GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion");
@@ -590,102 +585,6 @@ void GetCvars(float f)
        }
 }
 
-void backtrace(string msg)
-{
-    float dev, war;
-    dev = autocvar_developer;
-    war = autocvar_prvm_backtraceforwarnings;
-    cvar_set("developer", "1");
-    cvar_set("prvm_backtraceforwarnings", "1");
-    print("\n");
-    print("--- CUT HERE ---\nWARNING: ");
-    print(msg);
-    print("\n");
-    remove(world); // isn't there any better way to cause a backtrace?
-    print("\n--- CUT UNTIL HERE ---\n");
-    cvar_set("developer", ftos(dev));
-    cvar_set("prvm_backtraceforwarnings", ftos(war));
-}
-
-string Team_ColorCode(float teamid)
-{
-    if (teamid == COLOR_TEAM1)
-        return "^1";
-    else if (teamid == COLOR_TEAM2)
-        return "^4";
-    else if (teamid == COLOR_TEAM3)
-        return "^3";
-    else if (teamid == COLOR_TEAM4)
-        return "^6";
-    else
-        return "^7";
-}
-
-string Team_ColorName(float t)
-{
-    // fixme: Search for team entities and get their .netname's!
-    if (t == COLOR_TEAM1)
-        return "Red";
-    if (t == COLOR_TEAM2)
-        return "Blue";
-    if (t == COLOR_TEAM3)
-        return "Yellow";
-    if (t == COLOR_TEAM4)
-        return "Pink";
-    return "Neutral";
-}
-
-string Team_ColorNameLowerCase(float t)
-{
-    // fixme: Search for team entities and get their .netname's!
-    if (t == COLOR_TEAM1)
-        return "red";
-    if (t == COLOR_TEAM2)
-        return "blue";
-    if (t == COLOR_TEAM3)
-        return "yellow";
-    if (t == COLOR_TEAM4)
-        return "pink";
-    return "neutral";
-}
-
-float ColourToNumber(string team_colour)
-{
-       if (team_colour == "red")
-               return COLOR_TEAM1;
-
-       if (team_colour == "blue")
-               return COLOR_TEAM2;
-
-       if (team_colour == "yellow")
-               return COLOR_TEAM3;
-
-       if (team_colour == "pink")
-               return COLOR_TEAM4;
-
-       if (team_colour == "auto")
-               return 0;
-
-       return -1;
-}
-
-float NumberToTeamNumber(float number)
-{
-       if (number == 1)
-               return COLOR_TEAM1;
-
-       if (number == 2)
-               return COLOR_TEAM2;
-
-       if (number == 3)
-               return COLOR_TEAM3;
-
-       if (number == 4)
-               return COLOR_TEAM4;
-
-       return -1;
-}
-
 // decolorizes and team colors the player name when needed
 string playername(entity p)
 {
@@ -1161,7 +1060,6 @@ void readlevelcvars(void)
     g_touchexplode_force = cvar("g_touchexplode_force");
 
        sv_clones = cvar("sv_clones");
-       sv_gentle = cvar("sv_gentle");
        sv_foginterval = cvar("sv_foginterval");
        g_cloaked = cvar("g_cloaked");
     if(g_cts)
@@ -1640,34 +1538,6 @@ void precache()
 #endif
 }
 
-// sorry, but using \ in macros breaks line numbers
-#define WRITESPECTATABLE_MSG_ONE_VARNAME(varname,statement) entity varname; varname = msg_entity; FOR_EACH_REALCLIENT(msg_entity) if(msg_entity == varname || (msg_entity.classname == STR_SPECTATOR && msg_entity.enemy == varname)) statement msg_entity = varname
-#define WRITESPECTATABLE_MSG_ONE(statement) WRITESPECTATABLE_MSG_ONE_VARNAME(oldmsg_entity, statement)
-#define WRITESPECTATABLE(msg,statement) if(msg == MSG_ONE) { WRITESPECTATABLE_MSG_ONE(statement); } else statement float WRITESPECTATABLE_workaround = 0
-
-
-void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num)
-{
-       if ((clienttype(e) == CLIENTTYPE_REAL) && (e.flags & FL_CLIENT))
-       {
-               msg_entity = e;
-               WRITESPECTATABLE_MSG_ONE({
-                       WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_CENTERPRINT_GENERIC);
-                       WriteByte(MSG_ONE, id);
-                       WriteString(MSG_ONE, s);
-                       if (id != 0 && s != "")
-                       {
-                               WriteByte(MSG_ONE, duration);
-                               WriteByte(MSG_ONE, countdown_num);
-                       }
-               });
-       }
-}
-void Send_CSQC_Centerprint_Generic_Expire(entity e, float id)
-{
-       Send_CSQC_Centerprint_Generic(e, id, "", 1, 0);
-}
 // WARNING: this kills the trace globals
 #define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return
 #define EXACTTRIGGER_INIT  WarpZoneLib_ExactTrigger_Init()
@@ -2761,3 +2631,8 @@ float isPushable(entity e)
                return TRUE;
        return FALSE;
 }
+
+void dedicated_print(string input) // print(), but only print if the server is not local
+{
+       if not(server_is_local) { print(input); }
+}
index 134e979d1c17d0b09da3b1658b0fd724a791b55e..4ede871caf730e94c0dd227ab4322748f7a8acc1 100644 (file)
@@ -20,36 +20,45 @@ void ctf_EventLog(string mode, float flagteam, entity actor) // use an alias for
                GameLogEcho(strcat(":ctf:", mode, ":", ftos(flagteam), ((actor != world) ? (strcat(":", ftos(actor.playerid))) : "")));
 }
 
-string ctf_CaptureRecord(entity flag, entity player)
+void ctf_CaptureRecord(entity flag, entity player)
 {
-       float cap_time, cap_record, success;
-       string cap_message = string_null, refername;
+       entity tmp_entity;
+       float cap_record = ctf_captimerecord;
+       float cap_time = (time - flag.ctf_pickuptime);
+       string refername = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"));
        
-       if((autocvar_g_ctf_captimerecord_always) || (player_count - currentbots)) 
+       // notify about shit
+       FOR_EACH_REALCLIENT(tmp_entity)
        {
-               cap_record = ctf_captimerecord;
-               cap_time = (time - flag.ctf_pickuptime);
-
-               refername = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"));
-               refername = ((refername == player.netname) ? "their" : strcat(refername, "^7's"));
-
-               if(!ctf_captimerecord) 
-                       { cap_message = strcat(" in ", ftos_decimals(cap_time, 2), " seconds"); success = TRUE; }
-               else if(cap_time < cap_record) 
-                       { cap_message = strcat(" in ", ftos_decimals(cap_time, 2), " seconds, breaking ", refername, " previous record of ", ftos_decimals(cap_record, 2), " seconds"); success = TRUE; }
-               else
-                       { cap_message = strcat(" in ", ftos_decimals(cap_time, 2), " seconds, failing to break ", refername, " record of ", ftos_decimals(cap_record, 2), " seconds"); success = FALSE; }
+               if(tmp_entity.CAPTURE_VERBOSE)
+               {
+                       if(!ctf_captimerecord) { Send_Notification(NOTIF_ONE_ONLY, tmp_entity, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); }
+                       else if(cap_time < cap_record) { Send_Notification(NOTIF_ONE_ONLY, tmp_entity, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
+                       else { Send_Notification(NOTIF_ONE_ONLY, tmp_entity, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
+               }
+               else { Send_Notification(NOTIF_ONE_ONLY, tmp_entity, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_), player.netname); }
+       }
 
-               if(success) 
+       // notify server log too
+       if not(server_is_local)
+       {
+               if(autocvar_notification_ctf_capture_verbose)
                {
-                       ctf_captimerecord = cap_time;
-                       db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/time"), ftos(cap_time));
-                       db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"), player.netname);
-                       write_recordmarker(player, (time - cap_time), cap_time); 
-               } 
+                       if(!ctf_captimerecord) { Local_Notification(MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); }
+                       else if(cap_time < cap_record) { Local_Notification(MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
+                       else { Local_Notification(MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
+               }
+               else { Local_Notification(MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_), player.netname); }
        }
        
-       return cap_message;
+       // write that shit in the database
+       if((!ctf_captimerecord) || (cap_time < cap_record))
+       {
+               ctf_captimerecord = cap_time;
+               db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/time"), ftos(cap_time));
+               db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"), player.netname);
+               write_recordmarker(player, (time - cap_time), cap_time); 
+       } 
 }
 
 void ctf_FlagcarrierWaypoints(entity player)
@@ -165,11 +174,7 @@ void ctf_CaptureShield_Update(entity player, float wanted_status)
        float updated_status = ctf_CaptureShield_CheckStatus(player);
        if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status)) // 0: shield only, 1: unshield only
        {
-               if(updated_status) // TODO csqc notifier for this // Samual: How?
-                       Send_CSQC_Centerprint_Generic(player, CPID_CTF_CAPTURESHIELD, "^3You are now ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Make some defensive scores before trying again.", 5, 0);
-               else
-                       Send_CSQC_Centerprint_Generic(player, CPID_CTF_CAPTURESHIELD, "^3You are now free.\n\n^3Feel free to ^1try to capture^3 the flag again\n^3if you think you will succeed.", 5, 0);
-                       
+               Send_Notification(NOTIF_ONE, player, MSG_CENTER, ((updated_status) ? CENTER_CTF_CAPTURESHIELD_SHIELDED : CENTER_CTF_CAPTURESHIELD_FREE));
                player.ctf_captureshielded = updated_status;
        }
 }
@@ -191,7 +196,7 @@ void ctf_CaptureShield_Touch()
        vector othermid = (other.absmin + other.absmax) * 0.5;
 
        Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * ctf_captureshield_force);
-       Send_CSQC_Centerprint_Generic(other, CPID_CTF_CAPTURESHIELD, "^3You are ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Get some defensive scores before trying again.", 5, 0);
+       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED);
 }
 
 void ctf_CaptureShield_Spawn(entity flag)
@@ -234,7 +239,7 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype)
        flag.ctf_status = FLAG_DROPPED;
        
        // messages and sounds
-       Send_KillNotification(player.netname, flag.netname, "", INFO_LOSTFLAG, MSG_INFO);
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname);
        sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTN_NONE);
        ctf_EventLog("dropped", player.team, player);
 
@@ -287,11 +292,11 @@ void ctf_Handle_Retrieve(entity flag, entity player)
        FOR_EACH_REALPLAYER(tmp_player)
        {
                if(tmp_player == sender)
-                       centerprint(tmp_player, strcat("You passed the ", flag.netname, " to ", player.netname));
+                       Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname);
                else if(tmp_player == player)
-                       centerprint(tmp_player, strcat("You received the ", flag.netname, " from ", sender.netname));
+                       Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname);
                else if(!IsDifferentTeam(tmp_player, sender))
-                       centerprint(tmp_player, strcat(sender.netname, " passed the ", flag.netname, " to ", player.netname));
+                       Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname);
        }
        
        // create new waypoint
@@ -404,7 +409,8 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
        if not(player) { return; } // without someone to give the reward to, we can't possibly cap
        
        // messages and sounds
-       Send_KillNotification(player.netname, enemy_flag.netname, ctf_CaptureRecord(enemy_flag, player), INFO_CAPTUREFLAG, MSG_INFO);
+       Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_));
+       ctf_CaptureRecord(enemy_flag, player);
        sound(player, CH_TRIGGER, flag.snd_flag_capture, VOL_BASE, ATTN_NONE);
        
        switch(capturetype)
@@ -445,8 +451,8 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
 void ctf_Handle_Return(entity flag, entity player)
 {
        // messages and sounds
-       //centerprint(player, strcat("You returned the ", flag.netname));
-       Send_KillNotification(player.netname, flag.netname, "", INFO_RETURNFLAG, MSG_INFO);
+       Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_));
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname);
        sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE);
        ctf_EventLog("return", flag.team, player);
 
@@ -471,7 +477,6 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
 {
        // declarations
        entity tmp_player; // temporary entity which the FOR_EACH_PLAYER loop uses to scan players
-       string verbosename; // holds the name of the player OR no name at all for printing in the centerprints
        float pickup_dropped_score; // used to calculate dropped pickup score
        
        // attach the flag to the player
@@ -495,21 +500,30 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
        }
 
        // messages and sounds
-       Send_KillNotification (player.netname, flag.netname, "", INFO_GOTFLAG, MSG_INFO);
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname);
        sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTN_NONE);
-       verbosename = ((autocvar_g_ctf_flag_pickup_verbosename) ? strcat(Team_ColorCode(player.team), "(^7", player.netname, Team_ColorCode(player.team), ") ") : "");
-       
+
        FOR_EACH_REALPLAYER(tmp_player)
        {
                if(tmp_player == player)
                {
-                       centerprint(tmp_player, strcat("You got the ", flag.netname, "!"));
-                       //if(ctf_stalemate) { centerprint(tmp_player, "Stalemate! Enemies can see you on radar!"); }
+                       Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_));
+                       if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); }
+               }
+               else if(!IsDifferentTeam(tmp_player, player) && tmp_player != player)
+               {
+                       if(tmp_player.PICKUP_TEAM_VERBOSE)
+                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_TEAM_VERBOSE, Team_ColorCode(player.team), player.netname);
+                       else
+                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_TEAM, Team_ColorCode(player.team));
+               }
+               else if(IsDifferentTeam(tmp_player, player))
+               {
+                       if(tmp_player.PICKUP_ENEMY_VERBOSE)
+                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY_VERBOSE, Team_ColorCode(player.team), player.netname);
+                       else
+                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY, Team_ColorCode(player.team));
                }
-               //else if(!IsDifferentTeam(tmp_player, player))
-               //      centerprint(tmp_player, strcat("Your ", Team_ColorCode(player.team), "team mate ", verbosename, "^7got the flag! Protect them!"));
-               else if(!IsDifferentTeam(tmp_player, flag))
-                       centerprint(tmp_player, strcat("The ", Team_ColorCode(player.team), "enemy ", verbosename, "^7got your flag! Retrieve it!"));
        }
        
        // scoring
@@ -568,14 +582,14 @@ void ctf_CheckFlagReturn(entity flag, float returntype)
                {
                        switch(returntype)
                        {
-                               case RETURN_DROPPED: bprint("The ", flag.netname, " was dropped in the base and returned itself\n"); break;
-                               case RETURN_DAMAGE: bprint("The ", flag.netname, " was destroyed and returned to base\n"); break;
-                               case RETURN_SPEEDRUN: bprint("The ", flag.netname, " became impatient after ", ftos_decimals(ctf_captimerecord, 2), " seconds and returned itself\n"); break;
-                               case RETURN_NEEDKILL: bprint("The ", flag.netname, " fell somewhere it couldn't be reached and returned to base\n"); break;
+                               case RETURN_DROPPED: Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_)); break;
+                               case RETURN_DAMAGE: Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_)); break;
+                               case RETURN_SPEEDRUN: Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), ctf_captimerecord); break;
+                               case RETURN_NEEDKILL: Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_)); break;
                                
                                default:
                                case RETURN_TIMEOUT:
-                                       { bprint("The ", flag.netname, " has returned to base\n"); break; }
+                                       { Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_)); break; }
                        }
                        sound(flag, CH_TRIGGER, flag.snd_flag_respawn, VOL_BASE, ATTN_NONE);
                        ctf_EventLog("returned", flag.team, world);
@@ -604,8 +618,8 @@ void ctf_CheckStalemate(void)
                        
                        switch(tmp_entity.team)
                        {
-                               case COLOR_TEAM1: ++stale_red_flags; break;
-                               case COLOR_TEAM2: ++stale_blue_flags; break;
+                               case FL_TEAM_1: ++stale_red_flags; break;
+                               case FL_TEAM_2: ++stale_blue_flags; break;
                        }
                }
        }
@@ -629,10 +643,7 @@ void ctf_CheckStalemate(void)
                if not(wpforenemy_announced)
                {
                        FOR_EACH_REALPLAYER(tmp_entity)
-                               if(tmp_entity.flagcarried)
-                                       centerprint(tmp_entity, "Stalemate! Enemies can now see you on radar!");
-                               else
-                                       centerprint(tmp_entity, "Stalemate! Flag carriers can now be seen by enemies on radar!");
+                               Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER));
                        
                        wpforenemy_announced = TRUE;
                }
@@ -931,7 +942,7 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf
        self.bot_basewaypoint = self.nearestwaypoint;
 
        // waypointsprites
-       WaypointSprite_SpawnFixed(((self.team == COLOR_TEAM1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE));
+       WaypointSprite_SpawnFixed(((self.team == FL_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE));
        WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE));
 
        // captureshield setup
@@ -948,10 +959,10 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        flag.ctf_worldflagnext = ctf_worldflaglist; // link flag into ctf_worldflaglist
        ctf_worldflaglist = flag;
 
-       setattachment(flag, world, ""); 
+       setattachment(flag, world, "");
 
-       flag.netname = ((teamnumber) ? "^1RED^7 flag" : "^4BLUE^7 flag");
-       flag.team = ((teamnumber) ? COLOR_TEAM1 : COLOR_TEAM2); // COLOR_TEAM1: color 4 team (red) - COLOR_TEAM2: color 13 team (blue)
+       flag.netname = ((teamnumber) ? "^1REPLACETHIS^7" : "^4REPLACETHIS^7"); // ((teamnumber) ? "^1RED^7 flag" : "^4BLUE^7 flag");
+       flag.team = ((teamnumber) ? FL_TEAM_1 : FL_TEAM_2); // FL_TEAM_1: color 4 team (red) - FL_TEAM_2: color 13 team (blue)
        flag.items = ((teamnumber) ? IT_KEY2 : IT_KEY1); // IT_KEY2: gold key (redish enough) - IT_KEY1: silver key (bluish enough)
        flag.classname = "item_flag_team";
        flag.target = "###item###"; // wut?
@@ -1762,6 +1773,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t
                        frag_target.wps_helpme_time = time;
                        WaypointSprite_HelpMePing(frag_target.wps_flagcarrier);
                }
+               // todo: add notification for when flag carrier needs help?
        }
        return FALSE;
 }
@@ -1842,13 +1854,13 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                                                { 
                                                        if(clienttype(head) == CLIENTTYPE_BOT)
                                                        {
-                                                               centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); 
+                                                               Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
                                                                ctf_Handle_Throw(head, player, DROP_PASS);
                                                        }
                                                        else
                                                        {
-                                                               centerprint(head, strcat(player.netname, " requests you to pass the ", head.flagcarried.netname)); 
-                                                               centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); 
+                                                               Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname);
+                                                               Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
                                                        }
                                                        player.throw_antispam = time + autocvar_g_ctf_pass_wait; 
                                                        return TRUE; 
@@ -1885,7 +1897,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                                }
                                else
                                {
-                                       centerprint(player, strcat("Too many flag throws, throwing disabled for ", ftos(rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time)), " seconds."));
+                                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time));
                                        return FALSE;
                                }
                        }
@@ -1960,8 +1972,8 @@ MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun)
 {
        if(self.flagcarried)
        {
-               bprint("The ", self.flagcarried.netname, " was returned to base by its carrier\n");
-               ctf_RespawnFlag(self);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_));
+               ctf_RespawnFlag(self.flagcarried);
                return TRUE;
        }
        
@@ -2008,6 +2020,14 @@ MUTATOR_HOOKFUNCTION(ctf_BotRoles)
        return TRUE;
 }
 
+MUTATOR_HOOKFUNCTION(ctf_GetCvars)
+{
+       GetCvars_handleFloat(get_cvars_s, get_cvars_f, CAPTURE_VERBOSE, "notification_ctf_capture_verbose");
+       GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_TEAM_VERBOSE, "notification_ctf_pickup_team_verbose");
+       GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_ENEMY_VERBOSE, "notification_ctf_pickup_enemy_verbose");
+       return TRUE;
+}
+
 
 // ==========
 // Spawnfuncs
@@ -2020,7 +2040,7 @@ void spawnfunc_info_player_team1()
 {
        if(g_assault) { remove(self); return; }
        
-       self.team = COLOR_TEAM1; // red
+       self.team = FL_TEAM_1; // red
        spawnfunc_info_player_deathmatch();
 }
 
@@ -2032,7 +2052,7 @@ void spawnfunc_info_player_team2()
 {
        if(g_assault) { remove(self); return; }
        
-       self.team = COLOR_TEAM2; // blue
+       self.team = FL_TEAM_2; // blue
        spawnfunc_info_player_deathmatch();
 }
 
@@ -2043,7 +2063,7 @@ void spawnfunc_info_player_team3()
 {
        if(g_assault) { remove(self); return; }
        
-       self.team = COLOR_TEAM3; // yellow
+       self.team = FL_TEAM_3; // yellow
        spawnfunc_info_player_deathmatch();
 }
 
@@ -2055,7 +2075,7 @@ void spawnfunc_info_player_team4()
 {
        if(g_assault) { remove(self); return; }
        
-       self.team = COLOR_TEAM4; // purple
+       self.team = FL_TEAM_4; // purple
        spawnfunc_info_player_deathmatch();
 }
 
@@ -2157,8 +2177,8 @@ void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to
        if(find(world, classname, "ctf_team") == world)
        {
                print("No ""ctf_team"" entities found on this map, creating them anyway.\n");
-               ctf_SpawnTeam("Red", COLOR_TEAM1 - 1);
-               ctf_SpawnTeam("Blue", COLOR_TEAM2 - 1);
+               ctf_SpawnTeam("Red", FL_TEAM_1 - 1);
+               ctf_SpawnTeam("Blue", FL_TEAM_2 - 1);
        }
        
        ctf_ScoreRules();
@@ -2192,6 +2212,7 @@ MUTATOR_DEFINITION(gamemode_ctf)
        MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY);
        MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, ctf_BotRoles, CBC_ORDER_ANY);
+       MUTATOR_HOOK(GetCvars, ctf_GetCvars, CBC_ORDER_ANY);
        
        MUTATOR_ONADD
        {
index 1c5898bd1ad99afc1e3d773984620de82a2f288d..4a9164a22ba0fc261ddf05dc9e86af1add87612b 100644 (file)
@@ -1,5 +1,6 @@
 // these are needed since mutators are compiled last
 
+#ifdef SVQC
 // used in cheats.qc
 void ctf_RespawnFlag(entity flag);
 
@@ -130,3 +131,13 @@ vector havocbot_ctf_middlepoint;
 float havocbot_ctf_middlepoint_radius;
 
 void havocbot_role_ctf_setrole(entity bot, float role);
+
+// client notification stuff
+.float CAPTURE_VERBOSE;
+.float PICKUP_TEAM_VERBOSE;
+.float PICKUP_ENEMY_VERBOSE;
+#else
+var float autocvar_notification_ctf_pickup_team_verbose = TRUE;
+var float autocvar_notification_ctf_pickup_enemy_verbose = TRUE;
+#endif
+var float autocvar_notification_ctf_capture_verbose = TRUE;
index 852fb90c05dc287c0fdfeedeb31b61f6f9f4aa23..1c2ded2dbf893984ee3936e960a5febdabb017f3 100644 (file)
@@ -75,21 +75,8 @@ void dompoint_captured ()
        self.delay = old_delay;
        self.team = old_team;
 
-       switch(self.goalentity.team)
-       {
-               case COLOR_TEAM1:
-                       WaypointSprite_UpdateSprites(self.sprite, "dom-red", "", "");
-                       break;
-               case COLOR_TEAM2:
-                       WaypointSprite_UpdateSprites(self.sprite, "dom-blue", "", "");
-                       break;
-               case COLOR_TEAM3:
-                       WaypointSprite_UpdateSprites(self.sprite, "dom-yellow", "", "");
-                       break;
-               case COLOR_TEAM4:
-                       WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", "");
-       }
-
+       WaypointSprite_UpdateSprites(self.sprite, strcat("dom-", Team_ColorName_Lower(self.goalentity.team)), "", "");
+       
        total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
        for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
        {
@@ -103,16 +90,16 @@ void dompoint_captured ()
                        wait_time = head.wait;
                switch(head.goalentity.team)
                {
-                       case COLOR_TEAM1:
+                       case FL_TEAM_1:
                                pps_red += points/wait_time;
                                break;
-                       case COLOR_TEAM2:
+                       case FL_TEAM_2:
                                pps_blue += points/wait_time;
                                break;
-                       case COLOR_TEAM3:
+                       case FL_TEAM_3:
                                pps_yellow += points/wait_time;
                                break;
-                       case COLOR_TEAM4:
+                       case FL_TEAM_4:
                                pps_pink += points/wait_time;
                }
                total_pps += points/wait_time;
@@ -454,12 +441,12 @@ void dom_spawnteams()
 {
        float numteams = ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override);
 
-       dom_spawnteam("Red", COLOR_TEAM1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point");
-       dom_spawnteam("Blue", COLOR_TEAM2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point");
+       dom_spawnteam("Red", FL_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point");
+       dom_spawnteam("Blue", FL_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point");
        if(numteams > 2)
-               dom_spawnteam("Yellow", COLOR_TEAM3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point");
+               dom_spawnteam("Yellow", FL_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point");
        if(numteams > 3)
-               dom_spawnteam("Pink", COLOR_TEAM4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point");
+               dom_spawnteam("Pink", FL_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point");
        dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", "");
 }
 
index 116eecbbf6b773613f7b299568df3ee31a5817d6..77bb81ef34bf8650c847475bf5777458bfefed81 100644 (file)
@@ -22,7 +22,6 @@ void freezetag_CheckWinner()
                return; // we still have active players on two or more teams, nobody won yet
 
        entity e, winner;
-       string teamname;
        winner = world;
 
        FOR_EACH_PLAYER(e)
@@ -36,18 +35,8 @@ void freezetag_CheckWinner()
 
        if(winner != world) // just in case a winner wasn't found
        {
-               if(winner.team == COLOR_TEAM1)
-                       teamname = "^1Red Team";
-               else if(winner.team == COLOR_TEAM2)
-                       teamname = "^4Blue Team";
-               else if(winner.team == COLOR_TEAM3)
-                       teamname = "^3Yellow Team";
-               else
-                       teamname = "^6Pink Team";
-               FOR_EACH_PLAYER(e) {
-                       centerprint(e, strcat(teamname, "^5 wins the round, all other teams were frozen.\n"));
-               }
-               bprint(teamname, "^5 wins the round since all the other teams were frozen.\n");
+               Send_Notification(NOTIF_ANY, world, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_));
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_));
                TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
        }
 
@@ -242,13 +231,13 @@ MUTATOR_HOOKFUNCTION(freezetag_RemovePlayer)
 {
        if(self.freezetag_frozen == 0 && self.health >= 1)
        {
-               if(self.team == COLOR_TEAM1)
+               if(self.team == FL_TEAM_1)
                        --redalive;
-               else if(self.team == COLOR_TEAM2)
+               else if(self.team == FL_TEAM_2)
                        --bluealive;
-               else if(self.team == COLOR_TEAM3)
+               else if(self.team == FL_TEAM_3)
                        --yellowalive;
-               else if(self.team == COLOR_TEAM4)
+               else if(self.team == FL_TEAM_4)
                        --pinkalive;
                --totalalive;
        }
@@ -265,13 +254,13 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
 {
        if(self.freezetag_frozen == 0)
        {
-               if(self.team == COLOR_TEAM1)
+               if(self.team == FL_TEAM_1)
                        --redalive;
-               else if(self.team == COLOR_TEAM2)
+               else if(self.team == FL_TEAM_2)
                        --bluealive;
-               else if(self.team == COLOR_TEAM3)
+               else if(self.team == FL_TEAM_3)
                        --yellowalive;
-               else if(self.team == COLOR_TEAM4)
+               else if(self.team == FL_TEAM_4)
                        --pinkalive;
                --totalalive;
 
@@ -281,16 +270,16 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
        if(frag_attacker == frag_target || frag_attacker == world)
        {
                if(frag_target.classname == STR_PLAYER)
-                       centerprint(frag_target, "^1You froze yourself.\n");
-               bprint("^7", frag_target.netname, "^1 froze himself.\n");
+                       Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_SELF);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname);
        }
        else
        {
                if(frag_target.classname == STR_PLAYER)
-                       centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n"));
+                       Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname);
                if(frag_attacker.classname == STR_PLAYER)
-                       centerprint(frag_attacker, strcat("^2You froze ^7", frag_target.netname, ".\n"));
-               bprint("^7", frag_target.netname, "^1 was frozen by ^7", frag_attacker.netname, ".\n");
+                       Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname);
        }
 
        frag_target.health = 1; // "respawn" the player :P
@@ -312,7 +301,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
        }
        if(warmup && time > warmup) // spawn too late, freeze player
        {
-               centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");
+               Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE);
                freezetag_Freeze(world);
        }
 
@@ -376,15 +365,9 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
                                }
                        }
 
-                       if(n > 1)
-                               centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5 et al.\n"));
-                       else
-                               centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5.\n"));
-                       centerprint(o, strcat("^5You revived ^7", self.netname, "^5.\n"));
-                       if(n > 1)
-                               bprint("^7", o.netname, "^5 et al revived ^7", self.netname, "^5.\n");
-                       else
-                               bprint("^7", o.netname, "^5 revived ^7", self.netname, "^5.\n");
+                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname);
+                       Send_Notification(NOTIF_ONE, o, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname);
+                       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname);
                }
 
                // now find EVERY teammate within reviving radius, set their revive_progress values correct
index 3be0b035272b013598402f91188aed6c003069b6..05aa45deb3e0555aa76ae94ddf6b3a08466f6705 100644 (file)
@@ -101,9 +101,8 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        
        // messages and sounds
        ka_EventLog("pickup", other);
-       Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
-       WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
-       WriteString(MSG_BROADCAST, strcat(other.netname, "^7 has picked up the ball!"));
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname);
+       Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname);
        sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
@@ -144,9 +143,8 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
 
        // messages and sounds
        ka_EventLog("dropped", plyr);
-       Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
-       WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
-       WriteString(MSG_BROADCAST, strcat(plyr.netname, "^7 has dropped the ball!"));
+       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname);
+       Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname);
        sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);  // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
@@ -254,7 +252,7 @@ MUTATOR_HOOKFUNCTION(ka_Scoring)
                }
                else if(!frag_attacker.ballcarried)
                        if(autocvar_g_keepaway_noncarrier_warn)
-                               centerprint(frag_attacker, "Killing people while you don't have the ball gives no points!");
+                               Send_Notification(NOTIF_ONE_ONLY, frag_attacker, MSG_CENTER, CENTER_KEEPAWAY_WARN);
 
                if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
                        PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_killac);
index 592fa327cfb7af6ae6b413369dcc6759573523a2..7755b0f45514e0b72c4eb3bfd1015bb1fe400b12 100644 (file)
@@ -40,10 +40,10 @@ float kh_keystatus[17];
 
 float kh_Team_ByID(float t)
 {
-       if(t == 0) return COLOR_TEAM1;
-       if(t == 1) return COLOR_TEAM2;
-       if(t == 2) return COLOR_TEAM3;
-       if(t == 3) return COLOR_TEAM4;
+       if(t == 0) return FL_TEAM_1;
+       if(t == 1) return FL_TEAM_2;
+       if(t == 2) return FL_TEAM_3;
+       if(t == 3) return FL_TEAM_4;
        return 0;
 }
 
@@ -361,13 +361,13 @@ void kh_Key_AssignTo(entity key, entity player)  // runs every time a key is pic
                        WaypointSprite_AttachCarrier("", player, RADARICON_FLAGCARRIER, colormapPaletteColor(player.team - 1, 0));
                        player.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_KeyCarrier_waypointsprite_visible_for_player;
                        WaypointSprite_UpdateRule(player.waypointsprite_attachedforcarrier, player.team, SPRITERULE_TEAMPLAY);
-                       if(player.team == COLOR_TEAM1)
+                       if(player.team == FL_TEAM_1)
                                WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-red", "keycarrier-friend", "keycarrier-red");
-                       else if(player.team == COLOR_TEAM2)
+                       else if(player.team == FL_TEAM_2)
                                WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-blue", "keycarrier-friend", "keycarrier-blue");
-                       else if(player.team == COLOR_TEAM3)
+                       else if(player.team == FL_TEAM_3)
                                WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-yellow", "keycarrier-friend", "keycarrier-yellow");
-                       else if(player.team == COLOR_TEAM4)
+                       else if(player.team == FL_TEAM_4)
                                WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-pink", "keycarrier-friend", "keycarrier-pink");
                        if(!kh_no_radar_circles)
                                WaypointSprite_Ping(player.waypointsprite_attachedforcarrier);
@@ -541,7 +541,7 @@ void kh_WinnerTeam(float teem)  // runs when a team wins
                        bprint(key.owner.netname);
                        first = FALSE;
                }
-       bprint("^7 captured the keys for the ", ColoredTeamName(teem), "\n");
+       bprint("^7 captured the keys for the ", Team_ColoredFullName(teem), "\n");
 
        first = TRUE;
        midpoint = '0 0 0';
@@ -567,7 +567,7 @@ void kh_WinnerTeam(float teem)  // runs when a team wins
                te_lightning2(world, lastorigin, firstorigin);
        }
        midpoint = midpoint * (1 / kh_teams);
-       te_customflash(midpoint, 1000, 1, TeamColor(teem) * 0.5 + '0.5 0.5 0.5');  // make the color >=0.5 in each component
+       te_customflash(midpoint, 1000, 1, Team_ColorRGB(teem) * 0.5 + '0.5 0.5 0.5');  // make the color >=0.5 in each component
 
        play2all(kh_sound_capture);
        kh_FinishRound();
@@ -596,7 +596,7 @@ void kh_LoserTeam(float teem, entity lostkey)  // runs when a player pushes a fl
                kh_Scores_Event(attacker, world, "push", autocvar_g_balance_keyhunt_score_push, 0);
                PlayerScore_Add(attacker, SP_KH_PUSHES, 1);
                centerprint(attacker, "Your push is the best!");
-               bprint("The ", ColoredTeamName(teem), "^7 could not take care of the ", lostkey.netname, "^7 when ", attacker.netname, "^7 came\n");
+               bprint("The ", Team_ColoredFullName(teem), "^7 could not take care of the ", lostkey.netname, "^7 when ", attacker.netname, "^7 came\n");
        }
        else
        {
@@ -656,7 +656,7 @@ void kh_LoserTeam(float teem, entity lostkey)  // runs when a player pushes a fl
                        --j;
                }
 
-               bprint("The ", ColoredTeamName(teem), "^7 could not take care of the ", lostkey.netname, "\n");
+               bprint("The ", Team_ColoredFullName(teem), "^7 could not take care of the ", lostkey.netname, "\n");
        }
        play2all(kh_sound_destroy);
        te_tarexplosion(lostkey.origin);
@@ -715,7 +715,7 @@ void kh_Key_Think()  // runs all the time
                                else
                                        Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, "All keys are in your team's hands!\n\nHelp the key carriers to meet!", 0, 0);
                        else
-                               Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, strcat("All keys are in the ", ColoredTeamName(kh_interferemsg_team), "^7's hands!\n\nInterfere ^1NOW^7!"), 0, 0);
+                               Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, strcat("All keys are in the ", Team_ColoredFullName(kh_interferemsg_team), "^7's hands!\n\nInterfere ^1NOW^7!"), 0, 0);
                }
        }
 
@@ -748,21 +748,21 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i)  // runs every tim
        key.kh_dropperteam = 0;
        key.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        setsize(key, KH_KEY_MIN, KH_KEY_MAX);
-       key.colormod = TeamColor(initial_owner.team) * KH_KEY_BRIGHTNESS;
+       key.colormod = Team_ColorRGB(initial_owner.team) * KH_KEY_BRIGHTNESS;
        key.reset = key_reset;
 
        switch(initial_owner.team)
        {
-               case COLOR_TEAM1:
+               case FL_TEAM_1:
                        key.netname = "^1red key";
                        break;
-               case COLOR_TEAM2:
+               case FL_TEAM_2:
                        key.netname = "^4blue key";
                        break;
-               case COLOR_TEAM3:
+               case FL_TEAM_3:
                        key.netname = "^3yellow key";
                        break;
-               case COLOR_TEAM4:
+               case FL_TEAM_4:
                        key.netname = "^6pink key";
                        break;
                default:
@@ -876,7 +876,7 @@ string kh_CheckEnoughPlayers()  // checks enough player are present, runs after
                {
                        if(result != "")
                                result = strcat(result, ", ");
-                       result = strcat(result, ColoredTeamName(teem));
+                       result = strcat(result, Team_ColoredFullName(teem));
                }
        }
        return result;
index 62cfd01ad867250673f406bfc68ab7ea99841671..74698d371d30c7b918e46d99d6944d0cf4931d4a 100644 (file)
@@ -49,7 +49,7 @@ void nexball_setstatus(void)
        {
                if(self.ballcarried.teamtime && (self.ballcarried.teamtime < time))
                {
-                       bprint("The ", ColoredTeamName(self.team), " held the ball for too long.\n");
+                       bprint("The ", Team_ColoredFullName(self.team), " held the ball for too long.\n");
                        oldself = self;
                        self = self.ballcarried;
                        DropBall(self, self.owner.origin, '0 0 0');
@@ -204,7 +204,8 @@ void ResetBall(void)
        if(self.cnt < 2)        // step 1
        {
                if(time == self.teamtime)
-                       bprint("The ", ColoredTeamName(self.team), " held the ball for too long.\n");
+                       bprint("The ", Team_ColoredFullName(self.team), " held the ball for too long.\n");
+
                self.touch = func_null;
                self.movetype = MOVETYPE_NOCLIP;
                self.velocity = '0 0 0'; // just in case?
@@ -341,9 +342,9 @@ void GoalTouch(void)
        {
                LogNB("fault", ball.pusher);
                if(nb_teams == 2)
-                       bprint(ColoredTeamName(otherteam), " gets a point due to ", pname, "^7's silliness.\n");
+                       bprint(Team_ColoredFullName(otherteam), " gets a point due to ", pname, "^7's silliness.\n");
                else
-                       bprint(ColoredTeamName(ball.team), " loses a point due to ", pname, "^7's silliness.\n");
+                       bprint(Team_ColoredFullName(ball.team), " loses a point due to ", pname, "^7's silliness.\n");
                pscore = -1;
        }
        else if(self.team == GOAL_OUT)
@@ -358,7 +359,7 @@ void GoalTouch(void)
        else                                                       //score
        {
                LogNB(strcat("goal:", ftos(self.team)), ball.pusher);
-               bprint("Goaaaaal! ", pname, "^7 scored a point for the ", ColoredTeamName(ball.team), ".\n");
+               bprint("Goaaaaal! ", pname, "^7 scored a point for the ", Team_ColoredFullName(ball.team), ".\n");
                pscore = 1;
        }
 
@@ -424,28 +425,28 @@ void nb_spawnteams(void)
        {
                switch(e.team)
                {
-               case COLOR_TEAM1:
+               case FL_TEAM_1:
                        if(!t_r)
                        {
                                nb_spawnteam("Red", e.team-1)   ;
                                t_r = 1;
                        }
                        break;
-               case COLOR_TEAM2:
+               case FL_TEAM_2:
                        if(!t_b)
                        {
                                nb_spawnteam("Blue", e.team-1)  ;
                                t_b = 1;
                        }
                        break;
-               case COLOR_TEAM3:
+               case FL_TEAM_3:
                        if(!t_y)
                        {
                                nb_spawnteam("Yellow", e.team-1);
                                t_y = 1;
                        }
                        break;
-               case COLOR_TEAM4:
+               case FL_TEAM_4:
                        if(!t_p)
                        {
                                nb_spawnteam("Pink", e.team-1)  ;
@@ -575,22 +576,22 @@ void SpawnGoal(void)
 
 void spawnfunc_nexball_redgoal(void)
 {
-       self.team = COLOR_TEAM1;
+       self.team = FL_TEAM_1;
        SpawnGoal();
 }
 void spawnfunc_nexball_bluegoal(void)
 {
-       self.team = COLOR_TEAM2;
+       self.team = FL_TEAM_2;
        SpawnGoal();
 }
 void spawnfunc_nexball_yellowgoal(void)
 {
-       self.team = COLOR_TEAM3;
+       self.team = FL_TEAM_3;
        SpawnGoal();
 }
 void spawnfunc_nexball_pinkgoal(void)
 {
-       self.team = COLOR_TEAM4;
+       self.team = FL_TEAM_4;
        SpawnGoal();
 }
 
index dd0152ed084311be37509b34e5471531386afdcc..ee07c8f40f6a867d5e2db2a9bdd0985699904f0f 100644 (file)
@@ -163,16 +163,16 @@ void onslaught_updatelinks()
                        }
                        if(l.goalentity.classname == "onslaught_generator")
                        {
-                               if(l.goalentity.team == COLOR_TEAM1)
+                               if(l.goalentity.team == FL_TEAM_1)
                                        l.enemy.isgenneighbor_red = TRUE;
-                               else if(l.goalentity.team == COLOR_TEAM2)
+                               else if(l.goalentity.team == FL_TEAM_2)
                                        l.enemy.isgenneighbor_blue = TRUE;
                        }
                        else
                        {
-                               if(l.goalentity.team == COLOR_TEAM1)
+                               if(l.goalentity.team == FL_TEAM_1)
                                        l.enemy.iscpneighbor_red = TRUE;
-                               else if(l.goalentity.team == COLOR_TEAM2)
+                               else if(l.goalentity.team == FL_TEAM_2)
                                        l.enemy.iscpneighbor_blue = TRUE;
                        }
                }
@@ -185,16 +185,16 @@ void onslaught_updatelinks()
                        }
                        if(l.enemy.classname == "onslaught_generator")
                        {
-                               if(l.enemy.team == COLOR_TEAM1)
+                               if(l.enemy.team == FL_TEAM_1)
                                        l.goalentity.isgenneighbor_red = TRUE;
-                               else if(l.enemy.team == COLOR_TEAM2)
+                               else if(l.enemy.team == FL_TEAM_2)
                                        l.goalentity.isgenneighbor_blue = TRUE;
                        }
                        else
                        {
-                               if(l.enemy.team == COLOR_TEAM1)
+                               if(l.enemy.team == FL_TEAM_1)
                                        l.goalentity.iscpneighbor_red = TRUE;
-                               else if(l.enemy.team == COLOR_TEAM2)
+                               else if(l.enemy.team == FL_TEAM_2)
                                        l.goalentity.iscpneighbor_blue = TRUE;
                        }
                }
@@ -254,10 +254,10 @@ void onslaught_updatelinks()
        {
                if (l.iscaptured)
                {
-                       if (l.team == COLOR_TEAM1) t1 = 1;
-                       if (l.team == COLOR_TEAM2) t2 = 1;
-                       if (l.team == COLOR_TEAM3) t3 = 1;
-                       if (l.team == COLOR_TEAM4) t4 = 1;
+                       if (l.team == FL_TEAM_1) t1 = 1;
+                       if (l.team == FL_TEAM_2) t2 = 1;
+                       if (l.team == FL_TEAM_3) t3 = 1;
+                       if (l.team == FL_TEAM_4) t4 = 1;
                }
                onslaught_generator_updatesprite(l);
                l = l.chain;
@@ -271,14 +271,14 @@ void onslaught_updatelinks()
 
 float onslaught_controlpoint_can_be_linked(entity cp, float t)
 {
-       if(t == COLOR_TEAM1)
+       if(t == FL_TEAM_1)
        {
                if(cp.isgenneighbor_red)
                        return 2;
                if(cp.iscpneighbor_red)
                        return 1;
        }
-       else if(t == COLOR_TEAM2)
+       else if(t == FL_TEAM_2)
        {
                if(cp.isgenneighbor_blue)
                        return 2;
@@ -354,7 +354,7 @@ float onslaught_controlpoint_attackable(entity cp, float t)
                // if there's already an icon built, nothing happens
                if(cp.team == t)
                {
-                       a = onslaught_controlpoint_can_be_linked(cp, COLOR_TEAM1 + COLOR_TEAM2 - t);
+                       a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t);
                        if(a) // attackable by enemy?
                                return -2; // EMERGENCY!
                        return -1;
@@ -371,7 +371,7 @@ float onslaught_controlpoint_attackable(entity cp, float t)
                // free point
                if(onslaught_controlpoint_can_be_linked(cp, t))
                {
-                       a = onslaught_controlpoint_can_be_linked(cp, COLOR_TEAM1 + COLOR_TEAM2 - t);
+                       a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t);
                        if(a == 2)
                                return 4; // GET THIS ONE NOW!
                        else
@@ -596,7 +596,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
                if (time > self.pain_finished)
                {
                        self.pain_finished = time + 10;
-                       bprint(ColoredTeamName(self.team), " generator under attack!\n");
+                       bprint(Team_ColoredFullName(self.team), " generator under attack!\n");
                        play2team(self.team, "onslaught/generator_underattack.wav");
                }
        }
@@ -612,19 +612,19 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
                lh = ceil(self.lasthealth / 100) * 100;
                h = ceil(self.health / 100) * 100;
                if(lh != h)
-                       bprint(ColoredTeamName(self.team), " generator has less than ", ftos(h), " health remaining\n");
+                       bprint(Team_ColoredFullName(self.team), " generator has less than ", ftos(h), " health remaining\n");
 #endif
                self.lasthealth = self.health;
        }
        else if not(inWarmupStage)
        {
                if (attacker == self)
-                       bprint(ColoredTeamName(self.team), " generator spontaneously exploded due to overtime!\n");
+                       bprint(Team_ColoredFullName(self.team), " generator spontaneously exploded due to overtime!\n");
                else
                {
                        string t;
-                       t = ColoredTeamName(attacker.team);
-                       bprint(ColoredTeamName(self.team), " generator destroyed by ", t, "!\n");
+                       t = Team_ColoredFullName(attacker.team);
+                       bprint(Team_ColoredFullName(self.team), " generator destroyed by ", t, "!\n");
                }
                self.iscaptured = FALSE;
                self.islinked = FALSE;
@@ -706,16 +706,16 @@ string onslaught_generator_waypointsprite_for_team(entity e, float t)
 {
        if(t == e.team)
        {
-               if(e.team == COLOR_TEAM1)
+               if(e.team == FL_TEAM_1)
                        return "ons-gen-red";
-               else if(e.team == COLOR_TEAM2)
+               else if(e.team == FL_TEAM_2)
                        return "ons-gen-blue";
        }
        if(e.isshielded)
                return "ons-gen-shielded";
-       if(e.team == COLOR_TEAM1)
+       if(e.team == FL_TEAM_1)
                return "ons-gen-red";
-       else if(e.team == COLOR_TEAM2)
+       else if(e.team == FL_TEAM_2)
                return "ons-gen-blue";
        return "";
 }
@@ -723,8 +723,8 @@ string onslaught_generator_waypointsprite_for_team(entity e, float t)
 void onslaught_generator_updatesprite(entity e)
 {
        string s1, s2, s3;
-       s1 = onslaught_generator_waypointsprite_for_team(e, COLOR_TEAM1);
-       s2 = onslaught_generator_waypointsprite_for_team(e, COLOR_TEAM2);
+       s1 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_1);
+       s2 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_2);
        s3 = onslaught_generator_waypointsprite_for_team(e, -1);
        WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
 
@@ -734,14 +734,14 @@ void onslaught_generator_updatesprite(entity e)
                e.lastshielded = e.isshielded;
                if(e.lastshielded)
                {
-                       if(e.team == COLOR_TEAM1 || e.team == COLOR_TEAM2)
+                       if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 * colormapPaletteColor(e.team - 1, FALSE));
                        else
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.5 0.5 0.5');
                }
                else
                {
-                       if(e.team == COLOR_TEAM1 || e.team == COLOR_TEAM2)
+                       if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, FALSE));
                        else
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.75 0.75 0.75');
@@ -758,25 +758,25 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t)
                a = onslaught_controlpoint_attackable(e, t);
                if(a == 3 || a == 4) // ATTACK/TOUCH THIS ONE NOW
                {
-                       if(e.team == COLOR_TEAM1)
+                       if(e.team == FL_TEAM_1)
                                return "ons-cp-atck-red";
-                       else if(e.team == COLOR_TEAM2)
+                       else if(e.team == FL_TEAM_2)
                                return "ons-cp-atck-blue";
                        else
                                return "ons-cp-atck-neut";
                }
                else if(a == -2) // DEFEND THIS ONE NOW
                {
-                       if(e.team == COLOR_TEAM1)
+                       if(e.team == FL_TEAM_1)
                                return "ons-cp-dfnd-red";
-                       else if(e.team == COLOR_TEAM2)
+                       else if(e.team == FL_TEAM_2)
                                return "ons-cp-dfnd-blue";
                }
                else if(e.team == t || a == -1 || a == 1) // own point, or fire at it
                {
-                       if(e.team == COLOR_TEAM1)
+                       if(e.team == FL_TEAM_1)
                                return "ons-cp-red";
-                       else if(e.team == COLOR_TEAM2)
+                       else if(e.team == FL_TEAM_2)
                                return "ons-cp-blue";
                }
                else if(a == 2) // touch it
@@ -784,9 +784,9 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t)
        }
        else
        {
-               if(e.team == COLOR_TEAM1)
+               if(e.team == FL_TEAM_1)
                        return "ons-cp-red";
-               else if(e.team == COLOR_TEAM2)
+               else if(e.team == FL_TEAM_2)
                        return "ons-cp-blue";
                else
                        return "ons-cp-neut";
@@ -797,13 +797,13 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t)
 void onslaught_controlpoint_updatesprite(entity e)
 {
        string s1, s2, s3;
-       s1 = onslaught_controlpoint_waypointsprite_for_team(e, COLOR_TEAM1);
-       s2 = onslaught_controlpoint_waypointsprite_for_team(e, COLOR_TEAM2);
+       s1 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_1);
+       s2 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_2);
        s3 = onslaught_controlpoint_waypointsprite_for_team(e, -1);
        WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
 
        float sh;
-       sh = !(onslaught_controlpoint_can_be_linked(e, COLOR_TEAM1) || onslaught_controlpoint_can_be_linked(e, COLOR_TEAM2));
+       sh = !(onslaught_controlpoint_can_be_linked(e, FL_TEAM_1) || onslaught_controlpoint_can_be_linked(e, FL_TEAM_2));
 
        if(e.lastteam != e.team + 2 || e.lastshielded != sh || e.iscaptured != e.lastcaptured)
        {
@@ -821,14 +821,14 @@ void onslaught_controlpoint_updatesprite(entity e)
                }
                if(e.lastshielded)
                {
-                       if(e.team == COLOR_TEAM1 || e.team == COLOR_TEAM2)
+                       if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 * colormapPaletteColor(e.team - 1, FALSE));
                        else
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.5 0.5 0.5');
                }
                else
                {
-                       if(e.team == COLOR_TEAM1 || e.team == COLOR_TEAM2)
+                       if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE));
                        else
                                WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75');
@@ -910,10 +910,10 @@ void spawnfunc_onslaught_generator()
        if (!self.team)
                objerror("team must be set");
        
-       if(self.team == COLOR_TEAM1)
+       if(self.team == FL_TEAM_1)
         ons_red_generator = self;
 
-       if(self.team == COLOR_TEAM2)
+       if(self.team == FL_TEAM_2)
         ons_blue_generator = self;
         
        self.team_saved = self.team;
@@ -948,7 +948,7 @@ void spawnfunc_onslaught_generator()
        InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST);
 
        WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
-       WaypointSprite_UpdateRule(self.sprite, COLOR_TEAM2, SPRITERULE_TEAMPLAY);
+       WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY);
        WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
        WaypointSprite_UpdateHealth(self.sprite, self.health);
 
@@ -988,7 +988,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        if (attacker.classname == "player")
        {
                nag = FALSE;
-               if(self.team == COLOR_TEAM1)
+               if(self.team == FL_TEAM_1)
                {
                        if(time - ons_notification_time_team1 > 10)
                        {
@@ -996,7 +996,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
                                ons_notification_time_team1 = time;
                        }
                }
-               else if(self.team == COLOR_TEAM2)
+               else if(self.team == FL_TEAM_2)
                {
                        if(time - ons_notification_time_team2 > 10)
                        {
@@ -1035,8 +1035,8 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
                pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
                {
                        string t;
-                       t = ColoredTeamName(attacker.team);
-                       bprint(ColoredTeamName(self.team), " ", self.message, " control point destroyed by ", t, "\n");
+                       t = Team_ColoredFullName(attacker.team);
+                       bprint(Team_ColoredFullName(self.team), " ", self.message, " control point destroyed by ", t, "\n");
                        ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 25, "models/onslaught/controlpoint_icon_gib1.md3", 3, FALSE);
                        ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
                        ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
@@ -1234,7 +1234,7 @@ void onslaught_controlpoint_icon_buildthink()
                self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
                self.think = onslaught_controlpoint_icon_think;
                sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
-               bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
+               bprint(Team_ColoredFullName(self.team), " captured ", self.owner.message, " control point\n");
                self.owner.iscaptured = TRUE;
 
                WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
@@ -1438,7 +1438,7 @@ void spawnfunc_onslaught_controlpoint()
        waypoint_spawnforitem(self);
 
        WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
-       WaypointSprite_UpdateRule(self.sprite, COLOR_TEAM2, SPRITERULE_TEAMPLAY);
+       WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY);
 
        onslaught_updatelinks();
        
@@ -1476,28 +1476,28 @@ void onslaught_link_checkupdate()
        redpower = bluepower = 0;
        if(self.goalentity.islinked)
        {
-               if(self.goalentity.team == COLOR_TEAM1)
+               if(self.goalentity.team == FL_TEAM_1)
                        redpower = 1;
-               else if(self.goalentity.team == COLOR_TEAM2)
+               else if(self.goalentity.team == FL_TEAM_2)
                        bluepower = 1;
        }
        if(self.enemy.islinked)
        {
-               if(self.enemy.team == COLOR_TEAM1)
+               if(self.enemy.team == FL_TEAM_1)
                        redpower = 2;
-               else if(self.enemy.team == COLOR_TEAM2)
+               else if(self.enemy.team == FL_TEAM_2)
                        bluepower = 2;
        }
 
        float cc;
        if(redpower == 1 && bluepower == 2)
-               cc = (COLOR_TEAM1 - 1) * 0x01 + (COLOR_TEAM2 - 1) * 0x10;
+               cc = (FL_TEAM_1 - 1) * 0x01 + (FL_TEAM_2 - 1) * 0x10;
        else if(redpower == 2 && bluepower == 1)
-               cc = (COLOR_TEAM1 - 1) * 0x10 + (COLOR_TEAM2 - 1) * 0x01;
+               cc = (FL_TEAM_1 - 1) * 0x10 + (FL_TEAM_2 - 1) * 0x01;
        else if(redpower)
-               cc = (COLOR_TEAM1 - 1) * 0x11;
+               cc = (FL_TEAM_1 - 1) * 0x11;
        else if(bluepower)
-               cc = (COLOR_TEAM2 - 1) * 0x11;
+               cc = (FL_TEAM_2 - 1) * 0x11;
        else
                cc = 0;
 
@@ -1569,10 +1569,10 @@ MUTATOR_HOOKFUNCTION(ons_Spawn_Score)
     
        RandomSelection_Init();
        
-       if(self.team == COLOR_TEAM1)
+       if(self.team == FL_TEAM_1)
         RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
        
-       if(self.team == COLOR_TEAM2)
+       if(self.team == FL_TEAM_2)
         RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
        
        entity _cp = findchain(classname, "onslaught_controlpoint"):
@@ -1611,7 +1611,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
     
        RandomSelection_Init();
     
-       if(self.team == COLOR_TEAM1)
+       if(self.team == FL_TEAM_1)
        {
            if(!_close_to_home)
             _trg_gen = ons_blue_generator;
@@ -1619,7 +1619,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
             _trg_gen  = ons_red_generator;        
        }
        
-       if(self.team == COLOR_TEAM2)
+       if(self.team == FL_TEAM_2)
        {
            if(_close_to_home)
             _trg_gen = ons_blue_generator;
@@ -1664,7 +1664,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
         if(!autocvar_g_onslaught_spawn_at_generator)
             return 0;
         
-        _trg_gen = ((self.team == COLOR_TEAM1) ? ons_red_generator : ons_blue_generator);
+        _trg_gen = ((self.team == FL_TEAM_1) ? ons_red_generator : ons_blue_generator);
         
         for(i = 0; i < 10; ++i)
         {
index 0645b4805446b17cd1baafe035225d4b4793fceb..a5fb0e8011aec4afc41397ecf28979cb9c24c9da 100644 (file)
@@ -392,9 +392,9 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand)
                if(cmd_argc == 2)
                {
                        if(argv(1) == "red")
-                               _team = COLOR_TEAM1;
+                               _team = FL_TEAM_1;
                        else
-                               _team = COLOR_TEAM2;
+                               _team = FL_TEAM_2;
                }
 
                FOR_EACH_PLAYER(_player)
index db93116109612dd97660f35306509908f43df41c..ef4bc98cf2143098826be4705eb51e029bf41086 100644 (file)
@@ -13,8 +13,10 @@ sys-post.qh
 ../warpzonelib/server.qh
 
 ../common/constants.qh
+../common/teams.qh
 ../common/util.qh
 ../common/items.qh
+../common/deathtypes.qh
 ../common/explosion_equation.qh
 ../common/urllib.qh
 ../common/command/markup.qh
@@ -28,6 +30,8 @@ autocvars.qh
 constants.qh
 defs.qh                // Should rename this, it has fields and globals
 
+../common/notifications.qh // must be after autocvars
+
 mutators/base.qh
 mutators/mutators.qh
 mutators/gamemode_ctf.qh
@@ -235,5 +239,6 @@ mutators/mutator_superspec.qc
 
 ../common/animdecide.qc
 ../common/util.qc
+../common/notifications.qc
 
 ../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
index 2742888b6179bab1e088d5d4a222b778f01af3e2..2b61afd7e9636c0288177bfbec7ed4f50ec698ba 100644 (file)
@@ -153,16 +153,13 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
        if (player_prevpos && (player_prevpos < newpos || !newpos))
        {
                oldrec = race_readTime(GetMapname(), player_prevpos);
-               recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - oldrec), "]");
-               bprint(mynetname, "^7 couldn't break their ", race_placeName(player_prevpos), " place record of ", TIME_ENCODED_TOSTRING(oldrec), recorddifference, "\n");
                race_SendStatus(0, e); // "fail"
-               Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_FAIL, MSG_RACE);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_FAIL_RANKED, mynetname, player_prevpos, t, oldrec);
                return;
        } else if (!newpos) { // no ranking, time worse than the worst ranked
-               recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - race_readTime(GetMapname(), RANKINGS_CNT)), "]");
-               bprint(mynetname, "^7 couldn't break the ", race_placeName(RANKINGS_CNT), " place record of ", TIME_ENCODED_TOSTRING(race_readTime(GetMapname(), RANKINGS_CNT)), recorddifference, "\n");
+               oldrec = race_readTime(GetMapname(), RANKINGS_CNT);
                race_SendStatus(0, e); // "fail"
-               Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_FAIL, MSG_RACE);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_FAIL_UNRANKED, mynetname, RANKINGS_CNT, t, oldrec);
                return;
        }
 
@@ -201,22 +198,22 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
                        bprint(mynetname, "^1 broke ", oldrec_holder, "^1's 1st place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
                }
                race_SendStatus(3, e); // "new server record"
-               Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_SERVER_RECORD, MSG_RACE);
+               Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_NEW_RECORD, e.netname, TIME_ENCODED_TOSTRING(t));
        } else {
                if(newpos == player_prevpos) {
                        recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
                        bprint(mynetname, "^5 improved their ", race_placeName(newpos), " ^5place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n");
                        race_SendStatus(1, e); // "new time"
-                       Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_TIME, MSG_RACE);
+                       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_NEW_TIME, e.netname, TIME_ENCODED_TOSTRING(t));
                } else if (oldrec == 0) {
                        bprint(mynetname, "^2 set the ", race_placeName(newpos), " ^2place record with ", TIME_ENCODED_TOSTRING(t), "\n");
                        race_SendStatus(2, e); // "new rank"
-                       Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_RANK, MSG_RACE);
+                       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t));
                } else {
                        recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
                        bprint(mynetname, "^2 broke ", oldrec_holder, "^2's ", race_placeName(newpos), " ^2place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
                        race_SendStatus(2, e); // "new rank"
-                       Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_TIME, MSG_RACE);
+                       Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t));
                }
        }
 }
index 0df5b69af06fbc09c3809ddca9604a3d51a0f412..1d62a7084254e750e14c04136c37ca49e83245c3 100644 (file)
@@ -204,13 +204,13 @@ void ScoreInfo_Init(float teams)
                Net_LinkEntity(scores_initialized, FALSE, 0, ScoreInfo_SendEntity);
        }
        if(teams >= 1)
-               TeamScore_Spawn(COLOR_TEAM1, "Red");
+               TeamScore_Spawn(FL_TEAM_1, "Red");
        if(teams >= 2)
-               TeamScore_Spawn(COLOR_TEAM2, "Blue");
+               TeamScore_Spawn(FL_TEAM_2, "Blue");
        if(teams >= 3)
-               TeamScore_Spawn(COLOR_TEAM3, "Yellow");
+               TeamScore_Spawn(FL_TEAM_3, "Yellow");
        if(teams >= 4)
-               TeamScore_Spawn(COLOR_TEAM4, "Pink");
+               TeamScore_Spawn(FL_TEAM_4, "Pink");
 }
 
 /*
@@ -795,7 +795,7 @@ void Score_NicePrint_Team(entity to, float t, float w)
        sk = teamscorekeepers[t - 1];
        if(sk)
        {
-               s = strcat(s, ColoredTeamName(t));
+               s = strcat(s, Team_ColoredFullName(t));
                for(i = 0; i < MAX_TEAMSCORE; ++i)
                        if(teamscores_label[i] != "")
                        {
index 1ed2f533b3a923c93981ef14ad5403eb847a0f25..dddd5f1d4258f7409f2a4a0a8d91f5a3538ca681 100644 (file)
@@ -13,45 +13,6 @@ void TeamchangeFrags(entity e)
        PlayerScore_Clear(e);
 }
 
-vector TeamColor(float teem)
-{
-       switch(teem)
-       {
-               case COLOR_TEAM1:
-                       return '1 0.0625 0.0625';
-               case COLOR_TEAM2:
-                       return '0.0625 0.0625 1';
-               case COLOR_TEAM3:
-                       return '1 1 0.0625';
-               case COLOR_TEAM4:
-                       return '1 0.0625 1';
-               default:
-                       return '1 1 1';
-       }
-}
-
-string TeamName(float t)
-{
-       return strcat(Team_ColorName(t), " Team");
-}
-string ColoredTeamName(float t)
-{
-       return strcat(Team_ColorCode(t), Team_ColorName(t), " Team^7");
-}
-string TeamNoName(float t)
-{
-       // fixme: Search for team entities and get their .netname's!
-       if(t == 1)
-               return "Red Team";
-       if(t == 2)
-               return "Blue Team";
-       if(t == 3)
-               return "Yellow Team";
-       if(t == 4)
-               return "Pink Team";
-       return "Neutral Team";
-}
-
 void runematch_init();
 void tdm_init();
 void entcs_init();
@@ -416,13 +377,13 @@ void SetPlayerTeam(entity pl, float t, float s, float noprint)
        float _color;
 
        if(t == 4)
-               _color = COLOR_TEAM4 - 1;
+               _color = FL_TEAM_4 - 1;
        else if(t == 3)
-               _color = COLOR_TEAM3 - 1;
+               _color = FL_TEAM_3 - 1;
        else if(t == 2)
-               _color = COLOR_TEAM2 - 1;
+               _color = FL_TEAM_2 - 1;
        else
-               _color = COLOR_TEAM1 - 1;
+               _color = FL_TEAM_1 - 1;
 
        SetPlayerColors(pl,_color);
 
@@ -430,7 +391,7 @@ void SetPlayerTeam(entity pl, float t, float s, float noprint)
                LogTeamchange(pl.playerid, pl.team, 3);  // log manual team join
 
                if(!noprint)
-               bprint(pl.netname, "^7 has changed from ", TeamNoName(s), " to ", TeamNoName(t), "\n");
+               bprint(pl.netname, "^7 has changed from ", Team_NumberToColoredFullName(s), "^7 to ", Team_NumberToColoredFullName(t), "\n");
        }
 
 }
@@ -452,10 +413,10 @@ void CheckAllowedTeams (entity for_whom)
                head = findchain(classname, "onslaught_generator");
                while (head)
                {
-                       if (head.team == COLOR_TEAM1) c1 = 0;
-                       if (head.team == COLOR_TEAM2) c2 = 0;
-                       if (head.team == COLOR_TEAM3) c3 = 0;
-                       if (head.team == COLOR_TEAM4) c4 = 0;
+                       if (head.team == FL_TEAM_1) c1 = 0;
+                       if (head.team == FL_TEAM_2) c2 = 0;
+                       if (head.team == FL_TEAM_3) c3 = 0;
+                       if (head.team == FL_TEAM_4) c4 = 0;
                        head = head.chain;
                }
        }
@@ -497,13 +458,13 @@ void CheckAllowedTeams (entity for_whom)
                {
                        if(!(g_domination && head.netname == ""))
                        {
-                               if(head.team == COLOR_TEAM1)
+                               if(head.team == FL_TEAM_1)
                                        c1 = 0;
-                               else if(head.team == COLOR_TEAM2)
+                               else if(head.team == FL_TEAM_2)
                                        c2 = 0;
-                               else if(head.team == COLOR_TEAM3)
+                               else if(head.team == FL_TEAM_3)
                                        c3 = 0;
-                               else if(head.team == COLOR_TEAM4)
+                               else if(head.team == FL_TEAM_4)
                                        c4 = 0;
                        }
                        head = find(head, classname, teament_name);
@@ -533,13 +494,13 @@ void CheckAllowedTeams (entity for_whom)
        }
 
        // if player has a forced team, ONLY allow that one
-       if(self.team_forced == COLOR_TEAM1 && c1 >= 0)
+       if(self.team_forced == FL_TEAM_1 && c1 >= 0)
                c2 = c3 = c4 = -1;
-       else if(self.team_forced == COLOR_TEAM2 && c2 >= 0)
+       else if(self.team_forced == FL_TEAM_2 && c2 >= 0)
                c1 = c3 = c4 = -1;
-       else if(self.team_forced == COLOR_TEAM3 && c3 >= 0)
+       else if(self.team_forced == FL_TEAM_3 && c3 >= 0)
                c1 = c2 = c4 = -1;
-       else if(self.team_forced == COLOR_TEAM4 && c4 >= 0)
+       else if(self.team_forced == FL_TEAM_4 && c4 >= 0)
                c1 = c2 = c3 = -1;
 }
 
@@ -576,7 +537,7 @@ void GetTeamCounts(entity ignore)
                                bvalue = value;
                        else
                                bvalue = 0;
-                       if(t == COLOR_TEAM1)
+                       if(t == FL_TEAM_1)
                        {
                                if(c1 >= 0)
                                {
@@ -584,7 +545,7 @@ void GetTeamCounts(entity ignore)
                                        cb1 = cb1 + bvalue;
                                }
                        }
-                       if(t == COLOR_TEAM2)
+                       if(t == FL_TEAM_2)
                        {
                                if(c2 >= 0)
                                {
@@ -592,7 +553,7 @@ void GetTeamCounts(entity ignore)
                                        cb2 = cb2 + bvalue;
                                }
                        }
-                       if(t == COLOR_TEAM3)
+                       if(t == FL_TEAM_3)
                        {
                                if(c3 >= 0)
                                {
@@ -600,7 +561,7 @@ void GetTeamCounts(entity ignore)
                                        cb3 = cb3 + bvalue;
                                }
                        }
-                       if(t == COLOR_TEAM4)
+                       if(t == FL_TEAM_4)
                        {
                                if(c4 >= 0)
                                {
@@ -769,13 +730,13 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
        // if he's not on a valid team, then let other code put him on the smallest team
        if(!forcebestteam)
        {
-               if(     c1 >= 0 && pl.team == COLOR_TEAM1)
+               if(     c1 >= 0 && pl.team == FL_TEAM_1)
                        selectedteam = pl.team;
-               else if(c2 >= 0 && pl.team == COLOR_TEAM2)
+               else if(c2 >= 0 && pl.team == FL_TEAM_2)
                        selectedteam = pl.team;
-               else if(c3 >= 0 && pl.team == COLOR_TEAM3)
+               else if(c3 >= 0 && pl.team == FL_TEAM_3)
                        selectedteam = pl.team;
-               else if(c4 >= 0 && pl.team == COLOR_TEAM4)
+               else if(c4 >= 0 && pl.team == FL_TEAM_4)
                        selectedteam = pl.team;
                else
                        selectedteam = -1;
@@ -802,19 +763,19 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
                TeamchangeFrags(self);
                if(smallest == 1)
                {
-                       SetPlayerColors(pl, COLOR_TEAM1 - 1);
+                       SetPlayerColors(pl, FL_TEAM_1 - 1);
                }
                else if(smallest == 2)
                {
-                       SetPlayerColors(pl, COLOR_TEAM2 - 1);
+                       SetPlayerColors(pl, FL_TEAM_2 - 1);
                }
                else if(smallest == 3)
                {
-                       SetPlayerColors(pl, COLOR_TEAM3 - 1);
+                       SetPlayerColors(pl, FL_TEAM_3 - 1);
                }
                else if(smallest == 4)
                {
-                       SetPlayerColors(pl, COLOR_TEAM4 - 1);
+                       SetPlayerColors(pl, FL_TEAM_4 - 1);
                }
                else
                {
@@ -844,21 +805,21 @@ void SV_ChangeTeam(float _color)
        scolor = self.clientcolors & 0x0F;
        dcolor = _color & 0x0F;
 
-       if(scolor == COLOR_TEAM1 - 1)
+       if(scolor == FL_TEAM_1 - 1)
                steam = 1;
-       else if(scolor == COLOR_TEAM2 - 1)
+       else if(scolor == FL_TEAM_2 - 1)
                steam = 2;
-       else if(scolor == COLOR_TEAM3 - 1)
+       else if(scolor == FL_TEAM_3 - 1)
                steam = 3;
-       else // if(scolor == COLOR_TEAM4 - 1)
+       else // if(scolor == FL_TEAM_4 - 1)
                steam = 4;
-       if(dcolor == COLOR_TEAM1 - 1)
+       if(dcolor == FL_TEAM_1 - 1)
                dteam = 1;
-       else if(dcolor == COLOR_TEAM2 - 1)
+       else if(dcolor == FL_TEAM_2 - 1)
                dteam = 2;
-       else if(dcolor == COLOR_TEAM3 - 1)
+       else if(dcolor == FL_TEAM_3 - 1)
                dteam = 3;
-       else // if(dcolor == COLOR_TEAM4 - 1)
+       else // if(dcolor == FL_TEAM_4 - 1)
                dteam = 4;
 
        CheckAllowedTeams(self);
@@ -947,13 +908,13 @@ void ShufflePlayerOutOfTeam (float source_team)
        }
 
        if(source_team == 1)
-               steam = COLOR_TEAM1;
+               steam = FL_TEAM_1;
        else if(source_team == 2)
-               steam = COLOR_TEAM2;
+               steam = FL_TEAM_2;
        else if(source_team == 3)
-               steam = COLOR_TEAM3;
+               steam = FL_TEAM_3;
        else // if(source_team == 4)
-               steam = COLOR_TEAM4;
+               steam = FL_TEAM_4;
 
        lowest_bot = world;
        lowest_bot_score = 999999999;
@@ -1048,7 +1009,7 @@ void ShufflePlayerOutOfTeam (float source_team)
 
        if(selected.deadflag == DEAD_NO)
                Damage(selected, selected, selected, 100000, DEATH_AUTOTEAMCHANGE, selected.origin, '0 0 0');
-       centerprint(selected, strcat("You have been moved into a different team to improve team balance\nYou are now on: ", ColoredTeamName(selected.team)));
+       centerprint(selected, strcat("You have been moved into a different team to improve team balance\nYou are now on: ", Team_ColoredFullName(selected.team)));
 }
 
 // code from here on is just to support maps that don't have team entities
@@ -1072,12 +1033,12 @@ void tdm_spawnteams()
                numteams = autocvar_g_tdm_teams;
        numteams = bound(2, numteams, 4);
 
-       tdm_spawnteam("Red", COLOR_TEAM1-1);
-       tdm_spawnteam("Blue", COLOR_TEAM2-1);
+       tdm_spawnteam("Red", FL_TEAM_1-1);
+       tdm_spawnteam("Blue", FL_TEAM_2-1);
        if(numteams >= 3)
-               tdm_spawnteam("Yellow", COLOR_TEAM3-1);
+               tdm_spawnteam("Yellow", FL_TEAM_3-1);
        if(numteams >= 4)
-               tdm_spawnteam("Pink", COLOR_TEAM4-1);
+               tdm_spawnteam("Pink", FL_TEAM_4-1);
 }
 
 void tdm_delayedinit()
index 4bd1d0760b96128192ebeb0f585f9fb44b3a8515..20100de047203368a5d11e5a520a8cd8cdb39e11 100644 (file)
@@ -38,7 +38,7 @@ void walker_meele_do_dmg()
     {
         if (turret_validate_target(self, e, self.target_validate_flags))
             if (e != self && e.owner != self)
-                Damage(e, self, self, autocvar_g_turrets_unit_walker_std_meele_dmg, DEATH_TURRET_WALKER_MEELE, '0 0 0', v_forward * autocvar_g_turrets_unit_walker_std_meele_force);
+                Damage(e, self, self, autocvar_g_turrets_unit_walker_std_meele_dmg, DEATH_TURRET_WALK_MEELE, '0 0 0', v_forward * autocvar_g_turrets_unit_walker_std_meele_force);
 
         e = e.chain;
     }
@@ -51,7 +51,7 @@ void walker_setnoanim()
 }
 void walker_rocket_explode()
 {
-    RadiusDamage (self, self.owner, autocvar_g_turrets_unit_walker_std_rocket_dmg, 0, autocvar_g_turrets_unit_walker_std_rocket_radius, self, autocvar_g_turrets_unit_walker_std_rocket_force, DEATH_TURRET_WALKER_ROCKET, world);
+    RadiusDamage (self, self.owner, autocvar_g_turrets_unit_walker_std_rocket_dmg, 0, autocvar_g_turrets_unit_walker_std_rocket_radius, self, autocvar_g_turrets_unit_walker_std_rocket_force, DEATH_TURRET_WALK_ROCKET, world);
     remove (self);
 }
 
@@ -515,7 +515,7 @@ void walker_postthink()
 void walker_attack()
 {
     sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
-    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
     endFireBallisticBullet();
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 }
index b9c7dbfb8339e406603dbbea763f63c28ea81c24..429b8e5f9f8c55cdf709e2e405c5481dffb74527 100644 (file)
@@ -86,7 +86,7 @@ void bumb_fire_cannon(entity _gun, string _tagname, entity _owner)
        vehicles_projectile("bigplasma_muzzleflash", "weapons/flacexp3.wav",
                                                v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
                                                autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force,  0,
-                                               DEATH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
+                                               DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
 }
 
 float bumb_gunner_frame()
@@ -735,7 +735,7 @@ void bumb_blowup()
                                 autocvar_g_vehicle_bumblebee_blowup_edgedamage,
                                 autocvar_g_vehicle_bumblebee_blowup_radius, self,
                                 autocvar_g_vehicle_bumblebee_blowup_forceintensity,
-                                DEATH_WAKIBLOWUP, world);
+                                DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
        pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
index 93b27df9756a0deb3ef6452ebfc77e6df2878252..f5788c60b4b993a4631b2b4dbebe18456a136b85 100644 (file)
@@ -129,7 +129,7 @@ void racer_fire_cannon(string tagname)
     bolt = vehicles_projectile("wakizashi_gun_muzzleflash", "weapons/lasergun_fire.wav",
                            v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed,
                            autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force,  0,
-                           DEATH_WAKIGUN, PROJECTILE_WAKICANNON, 0, TRUE, TRUE, self.owner);
+                           DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, TRUE, TRUE, self.owner);
 
        // Fix z-aim (for chase mode)
     v = normalize(trace_endpos - bolt.origin);
@@ -243,7 +243,7 @@ void racer_fire_rocket(string tagname, entity trg)
     entity rocket = rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav",
                            v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
                            autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
-                           DEATH_WAKIROCKET, PROJECTILE_WAKIROCKET, 20, FALSE, FALSE, self.owner);
+                           DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, FALSE, FALSE, self.owner);
 
     rocket.lip              = autocvar_g_vehicle_racer_rocket_accel * sys_frametime;
     rocket.wait             = autocvar_g_vehicle_racer_rocket_turnrate;
@@ -542,7 +542,7 @@ void racer_blowup()
                                        autocvar_g_vehicle_racer_blowup_edgedamage,
                                        autocvar_g_vehicle_racer_blowup_radius, world,
                                        autocvar_g_vehicle_racer_blowup_forceintensity,
-                                       DEATH_WAKIBLOWUP, world);
+                                       DEATH_VH_WAKI_DEATH, world);
 
     self.nextthink  = time + autocvar_g_vehicle_racer_respawntime;
     self.think      = racer_spawn_default;
index 11b9081a6022dc72d9cbbaf45596fbba0fc59308..e899d4a31468b6a83d585babfee4d7f17287ffb3 100644 (file)
@@ -93,7 +93,7 @@ void raptor_bomblet_boom()
     RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
                                     autocvar_g_vehicle_raptor_bomblet_edgedamage,
                                     autocvar_g_vehicle_raptor_bomblet_radius, world,
-                                    autocvar_g_vehicle_raptor_bomblet_force, DEATH_RAPTOR_BOMB, world);
+                                    autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB, world);
     remove(self);
 }
 
@@ -124,7 +124,7 @@ void raptor_bomb_burst()
     entity bomblet;
     float i;
 
-    Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_RAPTOR_BOMB_SPLIT, 0, self);
+    Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_VH_RAPT_FRAGMENT, 0, self);
 
     for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
     {
@@ -185,7 +185,7 @@ void raptor_fire_cannon(entity gun, string tagname)
     vehicles_projectile("raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
                            gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
                            autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force,  0,
-                           DEATH_RAPTOR_CANNON, PROJECTILE_RAPTORCANNON, 0, TRUE, TRUE, self.owner);
+                           DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, TRUE, TRUE, self.owner);
 }
 
 void raptor_think()
@@ -690,7 +690,7 @@ void raptor_blowup()
 {
     self.deadflag    = DEAD_DEAD;
     self.vehicle_exit(VHEF_NORMAL);
-    RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
+    RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_VH_RAPT_DEATH, world);
 
     self.alpha          = -1;
     self.movetype       = MOVETYPE_NONE;
index de12407f558d9347c561ef77e8339ca3b35536f9..a66b564773635ce4b1a3d0e1b60b239d3a5cf7b5 100644 (file)
@@ -257,7 +257,7 @@ void spiderbot_rocket_do()
             rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
                                    v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                    autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
-                                   DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
+                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
             crosshair_trace(self.owner);
             float _dist = (random() * autocvar_g_vehicle_spiderbot_rocket_radius) + vlen(v - trace_endpos);
             _dist -= (random() * autocvar_g_vehicle_spiderbot_rocket_radius) ;
@@ -271,7 +271,7 @@ void spiderbot_rocket_do()
             rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
                                    v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                    autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
-                                   DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, FALSE, self.owner);
+                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, FALSE, self.owner);
             crosshair_trace(self.owner);
             rocket.pos1       = trace_endpos;
             rocket.nextthink  = time;
@@ -283,7 +283,7 @@ void spiderbot_rocket_do()
             rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
                                    v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                    autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
-                                   DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
+                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
             
             crosshair_trace(self.owner);
             
@@ -498,11 +498,12 @@ float spiderbot_frame()
 //void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
 
             fireBallisticBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_speed,
-                                5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_SBMINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
+                                5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
+
             endFireBallisticBullet();
 
 //            fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
-//                autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
+//                autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_VH_SPID_MINIGUN, 0);
 
             sound (gun, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
             //trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
@@ -722,7 +723,7 @@ void spiderbot_blowup()
     SUB_SetFade(g1, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
     SUB_SetFade(g2, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
 
-    RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
+    RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_VH_SPID_DEATH, world);
 
     self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
     self.movetype   = MOVETYPE_NONE;
index 5e377079e01dd2fc0b1377fde2a884a17e50656a..e23cc702cc706cdb912cf0e6602d0c5ce351aa82 100644 (file)
@@ -544,7 +544,7 @@ void vehicles_touch()
         if(vehicles_crushable(other))
         {
             if(vlen(self.velocity) != 0)
-                Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_VHCRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
+                Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_VH_CRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
 
             return; // Dont do selfdamage when hitting "soft targets".
         }
@@ -1033,7 +1033,7 @@ void vehicles_showwp()
     }
 
     if(teamplay && self.team)
-           rgb = TeamColor(self.team);
+           rgb = Team_ColorRGB(self.team);
     else
            rgb = '1 1 1';
     WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb);
index 1bb9ad6004e7853f71acd590f9837049df3bfe7e..b2472df2ae0fa5798f7cc3e80de744210cf88827 100644 (file)
@@ -684,6 +684,14 @@ float w_crylink(float req)
        {
                W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_CRYLINK_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_CRYLINK_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -712,19 +720,6 @@ float w_crylink(float req)
                precache_sound("weapons/crylink_impact2.wav");
                precache_sound("weapons/crylink_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = _("%s succeeded at self-destructing themself with the Crylink");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE)
-                       w_deathtypestring = _("%s could not hide from %s's Crylink"); // unchecked: SPLASH (SECONDARY can't be)
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s was too close to %s's Crylink"); // unchecked: SECONDARY
-               else
-                       w_deathtypestring = _("%s took a close look at %s's Crylink"); // unchecked: SECONDARY
-       }
        return TRUE;
 }
 #endif
index 082e454ace2de00516090a35270868346ba7a8c8..20aac867e91ae0f3b856be81fecc325b96f14180 100644 (file)
@@ -543,6 +543,27 @@ float w_electro(float req)
        {
                W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_ELECTRO_SUICIDE_ORBS;
+               else
+                       return WEAPON_ELECTRO_SUICIDE_BOLT;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       return WEAPON_ELECTRO_MURDER_ORBS;
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               return WEAPON_ELECTRO_MURDER_COMBO;
+                       else
+                               return WEAPON_ELECTRO_MURDER_BOLT;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -581,32 +602,6 @@ float w_electro(float req)
                precache_sound("weapons/electro_impact.wav");
                precache_sound("weapons/electro_impact_combo.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s could not remember where they put their electro plasma");
-               else
-                       w_deathtypestring = _("%s played with electro plasma");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE
-                               w_deathtypestring = _("%s just noticed %s's electro plasma");
-                       else // unchecked: BOUNCE
-                               w_deathtypestring = _("%s got in touch with %s's electro plasma");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE) // combo
-                               w_deathtypestring = _("%s felt the electrifying air of %s's electro combo");
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = _("%s got too close to %s's blue electro bolt");
-                       else
-                               w_deathtypestring = _("%s was blasted by %s's blue electro bolt");
-               }
-       }
        return TRUE;
 }
 #endif
index 508a8ba1a04123726fcc8b4ce490ed684f1404ef..4d243a513575bb04ab1703521d2c981801cb8c3c 100644 (file)
@@ -374,6 +374,24 @@ float w_fireball(float req)
        {
                self.fireball_primarytime = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_FIREBALL_SUICIDE_FIREMINE;
+               else
+                       return WEAPON_FIREBALL_SUICIDE_BLAST;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       return WEAPON_FIREBALL_MURDER_FIREMINE;
+               }
+               else
+               {
+                       return WEAPON_FIREBALL_MURDER_BLAST;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -399,34 +417,7 @@ float w_fireball(float req)
        {
                precache_sound("weapons/fireball_impact2.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s forgot about some firemine");
-               else
-                       w_deathtypestring = _("%s should have used a smaller gun");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       w_deathtypestring = _("%s fatefully ignored %s's firemine");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               if(w_deathtype & HITTYPE_SPLASH) // BFG effect
-                                       w_deathtypestring = _("%s could not hide from %s's fireball");
-                               else // laser
-                                       w_deathtypestring = _("%s saw the pretty lights of %s's fireball");
-                       }
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = _("%s got too close to %s's fireball");
-                       else
-                               w_deathtypestring = _("%s tasted %s's fireball");
-               }
-       }
+
        return TRUE;
 }
 #endif
index 91b50fe7f76642cf336763a11243baa401a482d5..b463a4e71ab0c18823678c8bd9d992060698dbe0 100644 (file)
@@ -366,6 +366,20 @@ float w_glauncher(float req)
        {
                W_Reload(min(autocvar_g_balance_grenadelauncher_primary_ammo, autocvar_g_balance_grenadelauncher_secondary_ammo), autocvar_g_balance_grenadelauncher_reload_ammo, autocvar_g_balance_grenadelauncher_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_MORTAR_SUICIDE_BOUNCE;
+               else
+                       return WEAPON_MORTAR_SUICIDE_EXPLODE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_MORTAR_MURDER_BOUNCE;
+               else
+                       return WEAPON_MORTAR_MURDER_EXPLODE;
+       }
        return TRUE;
 }
 #endif
@@ -384,23 +398,6 @@ float w_glauncher(float req)
        {
                precache_sound("weapons/grenade_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s didn't see their own grenade");
-               else
-                       w_deathtypestring = _("%s blew themself up with their grenadelauncher");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SPLASH)
-                       if(w_deathtype & HITTYPE_BOUNCE) // (must be secondary then)
-                               w_deathtypestring = _("%s didn't see %s's grenade");
-                       else // unchecked: SECONDARY
-                               w_deathtypestring = _("%s almost dodged %s's grenade");
-               else // unchecked: SECONDARY, BOUNCE
-                       w_deathtypestring = _("%s ate %s's grenade");
-       }
        return TRUE;
 }
 #endif
index 55e361ebbcdb9ca395f145407edc9b0d957f07ef..b4b79abb832363bfea7fcd11d775bb0c8eb84554 100644 (file)
@@ -432,6 +432,17 @@ float w_hagar(float req)
                if not(self.hagar_load) // require releasing loaded rockets first
                        W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_HAGAR_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_HAGAR_MURDER_BURST;
+               else
+                       return WEAPON_HAGAR_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -459,15 +470,6 @@ float w_hagar(float req)
                precache_sound("weapons/hagexp2.wav");
                precache_sound("weapons/hagexp3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s played with tiny hagar rockets");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH
-                       w_deathtypestring = _("%s was pummeled with a burst of hagar rockets by %s");
-               else // unchecked: SPLASH, SECONDARY
-                       w_deathtypestring = _("%s was pummeled with hagar rockets by %s");
-       }
        return TRUE;
 }
 #endif
index 716d0a177cd811bc5c4f91acd7c5238384b1c719..142a231923214be2cfd8a91b921fa00e88d56d15 100644 (file)
@@ -219,6 +219,14 @@ float w_hlac(float req)
        {
                W_Reload(min(autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_secondary_ammo), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_HLAC_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_HLAC_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -237,10 +245,6 @@ float w_hlac(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s should have used a smaller gun");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s was cut down with a HLAC by %s");
        return TRUE;
 }
 #endif
index c6644f1003be9867516d17c0db4f15d828af9da3..1f9dda17b6adcad942d336bd3ea224b2e0416092 100644 (file)
@@ -265,6 +265,14 @@ float w_hook(float req)
        {
                self.hook_refire = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return FALSE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_HOOK_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -283,10 +291,6 @@ float w_hook(float req)
        {
                precache_sound("weapons/hookbomb_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s did the impossible");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s was caught in %s's hook gravity bomb");
        return TRUE;
 }
 #endif
index ecedc89fc1bb5748ccba92a8f7b7e750c49f3ae4..69dcb17aa5c292d4328b539668c8dac674f76935 100644 (file)
@@ -291,6 +291,14 @@ float w_laser(float req)
        {
                W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_LASER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_LASER_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -309,15 +317,6 @@ float w_laser(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s lasered themself to hell");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH
-               else
-                       w_deathtypestring = _("%s was lasered to death by %s"); // unchecked: SPLASH
-       }
        return TRUE;
 }
 #endif
index 85ffa6399ff0555edb84717ee346f4c56e37c10e..6d3c331739917267ff28ff3035581d5f1631aec2 100644 (file)
@@ -521,6 +521,14 @@ float w_minelayer(float req)
        {
                W_Reload(autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_MINELAYER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_MINELAYER_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -539,20 +547,6 @@ float w_minelayer(float req)
        {
                precache_sound("weapons/mine_exp.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s blew themself up with their minelayer");
-               else
-                       w_deathtypestring = _("%s forgot about their mine");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s got too close to %s's mine");
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s almost dodged %s's mine");
-               else
-                       w_deathtypestring = _("%s stepped on %s's mine");
-       }
        return TRUE;
 }
 #endif
index 4031ca8a9d14e53a2bf47569a253237b6dc2f319..dae7003be5add2ccbd1ae6b3d43ea37f1a918c00 100644 (file)
@@ -43,25 +43,25 @@ void W_MinstaNex_Attack (void)
        {
            switch(self.team)
            {
-            case COLOR_TEAM1:   // Red
+            case FL_TEAM_1:   // Red
                 if(damage_goodhits)
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v);
                 else
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v);
                 break;
-            case COLOR_TEAM2:   // Blue
+            case FL_TEAM_2:   // Blue
                 if(damage_goodhits)
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v);
                 else
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v);
                 break;
-            case COLOR_TEAM3:   // Yellow
+            case FL_TEAM_3:   // Yellow
                 if(damage_goodhits)
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v);
                 else
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v);
                 break;
-            case COLOR_TEAM4:   // Pink
+            case FL_TEAM_4:   // Pink
                 if(damage_goodhits)
                     WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v);
                 else
@@ -271,6 +271,14 @@ float w_minstanex(float req)
 
                W_Reload(used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_MINSTANEX_MURDER;
+       }
        return TRUE;
 }
 #endif
index 51afdd00f100bcb7a3847960c43ec561619c08dd..9d66f407ef8bbb401c2fd4c77f0c1fd2ae52cf42 100644 (file)
@@ -233,7 +233,14 @@ float w_nex(float req)
        {
                W_Reload(min(autocvar_g_balance_nex_primary_ammo, autocvar_g_balance_nex_secondary_ammo), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav");
        }
-
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_NEX_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -252,10 +259,6 @@ float w_nex(float req)
        {
                precache_sound("weapons/neximpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s has been vaporized by %s's nex");
        return TRUE;
 }
 #endif
index f95e554b0e9799d78a52108ca39e72f2c7dde053..790bcd124c588deff469d8d258bed5b919009d3e 100644 (file)
@@ -375,10 +375,6 @@ float w_porto(float req)
        {
                // nothing to do
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s did the impossible");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s felt %s doing the impossible to him");
        return TRUE;
 }
 #endif
index f707bbd6525aacfdf2dc239ae7445b27ab257136..749906638bf0e2ab56e782516983ebeda7dcdb01 100644 (file)
@@ -200,6 +200,27 @@ float w_rifle(float req)
        {
                W_Reload(min(autocvar_g_balance_rifle_primary_ammo, autocvar_g_balance_rifle_secondary_ammo), autocvar_g_balance_rifle_reload_ammo, autocvar_g_balance_rifle_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               return WEAPON_RIFLE_MURDER_HAIL_PIERCING;
+                       else
+                               return WEAPON_RIFLE_MURDER_HAIL;
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               return WEAPON_RIFLE_MURDER_PIERCING;
+                       else
+                               return WEAPON_RIFLE_MURDER;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -227,27 +248,7 @@ float w_rifle(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = _("%s is now thinking with portals");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                               w_deathtypestring = _("%s failed to hide from %s's rifle bullet hail");
-                       else
-                               w_deathtypestring = _("%s died in %s's rifle bullet hail");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                               w_deathtypestring = _("%s failed to hide from %s's rifle");
-                       else
-                               w_deathtypestring = _("%s was sniped with a rifle by %s");
-               }
-       }
+
        return TRUE;
 }
 #endif
index add0207d12b57c8fd1ec90abd776143407bef84a..202dd68bdfaac166918253cf0863c88b3287c338 100644 (file)
@@ -446,6 +446,17 @@ float w_rlauncher(float req)
        {
                W_Reload(autocvar_g_balance_rocketlauncher_ammo, autocvar_g_balance_rocketlauncher_reload_ammo, autocvar_g_balance_rocketlauncher_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_ROCKETLAUNCHER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
+                       return WEAPON_ROCKETLAUNCHER_MURDER_SPLASH;
+               else
+                       return WEAPON_ROCKETLAUNCHER_MURDER_DIRECT;
+       }
        return TRUE;
 }
 #endif
@@ -464,17 +475,6 @@ float w_rlauncher(float req)
        {
                precache_sound("weapons/rocket_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s blew themself up with their rocketlauncher");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_BOUNCE) // (remote detonation)
-                       w_deathtypestring = _("%s got too close to %s's rocket");
-               else if(w_deathtype & HITTYPE_SPLASH)
-                       w_deathtypestring = _("%s almost dodged %s's rocket");
-               else
-                       w_deathtypestring = _("%s ate %s's rocket");
-       }
        return TRUE;
 }
 #endif
index cd9088e03a54a4d9910f94b4bd074f0b43f71657..837f8644a66e8a9b9ee62f00da0fd52db341c0c8 100644 (file)
@@ -612,6 +612,17 @@ float w_seeker(float req)
        {
                W_Reload(min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_SEEKER_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_SEEKER_MURDER_TAG;
+               else
+                       return WEAPON_SEEKER_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -667,15 +678,6 @@ float w_seeker(float req)
                precache_sound("weapons/tagexp3.wav");
                precache_sound("weapons/tag_impact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s played with tiny seeker rockets");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was tagged with a seeker by %s");
-               else
-                       w_deathtypestring = _("%s was pummeled with seeker rockets by %s");
-       }
        return TRUE;
 }
 #endif
index a4d4139700d8315d7d0afa53c88095590a0588a1..75f6a087d14256ef0b32ee3525809e847b47cf41 100644 (file)
@@ -238,6 +238,17 @@ float w_shotgun(float req)
        {
                W_Reload(autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_SHOTGUN_MURDER_SLAP;
+               else
+                       return WEAPON_SHOTGUN_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -267,15 +278,6 @@ float w_shotgun(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%2$s slapped %1$s around a bit with a large shotgun");
-               else
-                       w_deathtypestring = _("%s was gunned down with a shotgun by %s");
-       }
        return TRUE;
 }
 #endif
index d8d53f2bf4927065df81df3f2a750c4296bae899..43397be001093c5253dfce01b679d3dd464c91ee 100644 (file)
@@ -186,7 +186,7 @@ float Tuba_GetNote(entity pl, float hittype)
        // that way, holes in the range of notes are "plugged"
        if(teamplay)
        {
-               if(pl.team == COLOR_TEAM2 || pl.team == COLOR_TEAM4)
+               if(pl.team == FL_TEAM_2 || pl.team == FL_TEAM_4)
                        note += 3;
        }
        else
@@ -423,6 +423,24 @@ float w_tuba(float req)
                return TRUE; // TODO use fuel?
        else if (req == WR_CHECKAMMO2)
                return TRUE; // TODO use fuel?
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_SUICIDE;
+               else if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_KLEINBOTTLE_SUICIDE;
+               else
+                       return WEAPON_TUBA_SUICIDE;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_BOUNCE)
+                       return WEAPON_ACCORDEON_MURDER;
+               else if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_KLEINBOTTLE_MURDER;
+               else
+                       return WEAPON_TUBA_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -437,6 +455,8 @@ float w_tuba(float req)
        {
                // nothing to do
        }
+/*<<<<<<< HEAD
+=======
        else if (req == WR_SUICIDEMESSAGE)
        {
                float instr;
@@ -481,6 +501,7 @@ float w_tuba(float req)
                                break;
                }
        }
+>>>>>>> origin/master*/
        return TRUE;
 }
 #endif
index 525beeacaafa846b49279d945be8def74aedce61..3645b95db83f12c969e22e37fcdf1be8abb19c4d 100644 (file)
@@ -289,6 +289,17 @@ float w_uzi(float req)
        {
                W_Reload(min(max(autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_first_ammo), autocvar_g_balance_uzi_burst_ammo), autocvar_g_balance_uzi_reload_ammo, autocvar_g_balance_uzi_reload_time, "weapons/reload.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_UZI_MURDER_SNIPE;
+               else
+                       return WEAPON_UZI_MURDER_SPRAY;
+       }
        return TRUE;
 }
 #endif
@@ -314,15 +325,6 @@ float w_uzi(float req)
                precache_sound("weapons/ric2.wav");
                precache_sound("weapons/ric3.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was sniped by %s's machine gun");
-               else
-                       w_deathtypestring = _("%s was riddled full of holes by %s's machine gun");
-       }
        return TRUE;
 }
 #endif