From: Mario Date: Sat, 6 May 2017 15:54:16 +0000 (+1000) Subject: Hide powerup pickup notifications in CTS (hack) X-Git-Tag: xonotic-v0.8.5~2797 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=907f3aacb38cd5d3bb8ad66e3799bdf2627e5f53;p=xonotic%2Fxonotic-data.pk3dir.git Hide powerup pickup notifications in CTS (hack) --- 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;