From 907f3aacb38cd5d3bb8ad66e3799bdf2627e5f53 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 7 May 2017 01:54:16 +1000 Subject: [PATCH] Hide powerup pickup notifications in CTS (hack) --- qcsrc/server/client.qc | 9 ++++++--- qcsrc/server/mutators/mutator/gamemode_cts.qc | 5 +++++ qcsrc/server/weapons/throwing.qc | 2 -- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 798314159..95f287527 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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 diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index aeae1e1b9..ee8c221e5 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -406,6 +406,11 @@ MUTATOR_HOOKFUNCTION(cts, WantWeapon) return true; } +MUTATOR_HOOKFUNCTION(cts, ForbidDropCurrentWeapon) +{ + return true; +} + void cts_Initialize() { cts_ScoreRules(); diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 53e68d9eb..dd0f3a6c0 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -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; -- 2.39.2