]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix killnotification a bit, plus make spectating/teamchange centers red
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 21:36:06 +0000 (16:36 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 21:36:06 +0000 (16:36 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/server/cl_client.qc

index 054e19c958a9096da9589d5ccfc91f3187efc2a8..d682f8d960d5e188afd7ea975c47c9d16c34d5b5 100644 (file)
@@ -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
                        {
index bfafcb3b9958858a89851e9b7b78e4729d2c6adc..1e86659c6e1626e2cabd4db6a751dc4cf5d74b71 100644 (file)
@@ -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"), "")
index 4e4ea34de5f4151f9e353393a9930e1618ddf7a4..001f048fbad0d2b701a1b56db06c0229355de7bd 100644 (file)
@@ -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)
                        {