]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide powerup pickup notifications in CTS (hack)
authorMario <mario@smbclan.net>
Sat, 6 May 2017 15:54:16 +0000 (01:54 +1000)
committerMario <mario@smbclan.net>
Sat, 6 May 2017 15:54:16 +0000 (01:54 +1000)
qcsrc/server/client.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/weapons/throwing.qc

index 798314159e9ba208dd062fae2c0983f43b53e9a3..95f28752714a9c322ebfb08ba67cf0ffbcb930e6 100644 (file)
@@ -1443,7 +1443,8 @@ void player_powerups(entity this)
                        if (time < this.strength_finished)
                        {
                                this.items = this.items | ITEM_Strength.m_itemid;
-                               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, this.netname);
+                               if(!g_cts)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, this.netname);
                                Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_POWERUP_STRENGTH);
                        }
                }
@@ -1463,7 +1464,8 @@ void player_powerups(entity this)
                        if (time < this.invincible_finished)
                        {
                                this.items = this.items | ITEM_Shield.m_itemid;
-                               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, this.netname);
+                               if(!g_cts)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, this.netname);
                                Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_POWERUP_SHIELD);
                        }
                }
@@ -1497,7 +1499,8 @@ void player_powerups(entity this)
                        if (time < this.superweapons_finished || (this.items & IT_UNLIMITED_SUPERWEAPONS))
                        {
                                this.items = this.items | IT_SUPERWEAPON;
-                               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SUPERWEAPON_PICKUP, this.netname);
+                               if(!g_cts)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SUPERWEAPON_PICKUP, this.netname);
                                Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_SUPERWEAPON_PICKUP);
                        }
                        else
index aeae1e1b9722c24a4bb14d392d2a5e35839cacf7..ee8c221e5b9184fdbfab1ad2c38f5acd80a36cb3 100644 (file)
@@ -406,6 +406,11 @@ MUTATOR_HOOKFUNCTION(cts, WantWeapon)
        return true;
 }
 
+MUTATOR_HOOKFUNCTION(cts, ForbidDropCurrentWeapon)
+{
+       return true;
+}
+
 void cts_Initialize()
 {
        cts_ScoreRules();
index 53e68d9eb2259df91048e56348e3d8b2add3b1b1..dd0f3a6c0a1fac62e391e1b97eb1f0ef10be1145 100644 (file)
@@ -146,8 +146,6 @@ bool W_IsWeaponThrowable(entity this, int w)
                return false;
        if (g_weaponarena)
                return 0;
-       if (g_cts)
-               return 0;
     if(w == WEP_Null.m_id)
         return false;