From: Samual Lenks Date: Mon, 4 Mar 2013 21:36:06 +0000 (-0500) Subject: Fix killnotification a bit, plus make spectating/teamchange centers red X-Git-Tag: xonotic-v0.7.0~62^2~23^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=11abd7bd2879f47981e3ae2992ac2193cdc12c17;p=xonotic%2Fxonotic-data.pk3dir.git Fix killnotification a bit, plus make spectating/teamchange centers red --- 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) {