From 11abd7bd2879f47981e3ae2992ac2193cdc12c17 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Mon, 4 Mar 2013 16:36:06 -0500 Subject: [PATCH] Fix killnotification a bit, plus make spectating/teamchange centers red --- qcsrc/common/notifications.qc | 12 ++++++++---- qcsrc/common/notifications.qh | 6 +++--- qcsrc/server/cl_client.qc | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 054e19c95..d682f8d96 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -547,7 +547,7 @@ void Create_Notification_Entity( notif_error = TRUE; } } - else if(cpid != NO_CPID) { notif.nent_cpid = cpid; } + else if(cpid != NO_MSG) { notif.nent_cpid = cpid; } #endif @@ -1202,10 +1202,10 @@ void Kill_Notification( #ifdef NOTIFICATIONS_DEBUG dprint(sprintf( - "Kill_Notification(%d, '%s', %d, %d);\n", + "Kill_Notification(%d, '%s', %s, %d);\n", broadcast, client.netname, - net_type, + Get_Notif_TypeName(net_type), net_name )); #endif @@ -1227,7 +1227,11 @@ void Kill_Notification( { entity notif = Get_Notif_Ent(net_type, net_name); if not(notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; } - killed_cpid = notif.nent_cpid; + + if(notif.nent_cpid) + killed_cpid = notif.nent_cpid; + else + killed_cpid = NO_CPID; } else { diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index bfafcb3b9..1e86659c6 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -471,9 +471,9 @@ void Send_Notification_WOVA( MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_BROKEN, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Superweapons have broken down"), "") \ MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_LOST, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Superweapons have been lost"), "") \ MSG_CENTER_NOTIF(1, CENTER_SUPERWEAPON_PICKUP, 0, 0, "", CPID_POWERUP, "0 0", _("^F2You now have a superweapon"), "") \ - 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_AUTO, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^BGChanging team in ^COUNT"), "") \ - MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^BGSpectating in ^COUNT"), "") \ + MULTITEAM_CENTER(1, CENTER_TEAMCHANGE_, 4, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Changing to ^TC^TT^BG in ^COUNT"), "") \ + MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_AUTO, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Changing team in ^COUNT"), "") \ + MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Spectating in ^COUNT"), "") \ MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Suicide in ^COUNT"), "") \ MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "") \ MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout ends in ^COUNT"), "") diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 4e4ea34de..001f048fb 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2341,7 +2341,7 @@ void LeaveSpectatorMode() if(!autocvar_g_campaign) //if (time < self.jointime + autocvar_welcome_message_time) - Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_MOTD); + Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_MOTD); if (self.prevent_join_msgtime) { -- 2.39.2