[nexuiz-commits] r7386 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Aug 8 00:10:18 EDT 2009
Author: mand1nga
Date: 2009-08-08 00:10:17 -0400 (Sat, 08 Aug 2009)
New Revision: 7386
Modified:
trunk/data/qcsrc/server/mode_onslaught.qc
Log:
Fix "controlpoint under attack" sound spam
Modified: trunk/data/qcsrc/server/mode_onslaught.qc
===================================================================
--- trunk/data/qcsrc/server/mode_onslaught.qc 2009-08-07 18:57:04 UTC (rev 7385)
+++ trunk/data/qcsrc/server/mode_onslaught.qc 2009-08-08 04:10:17 UTC (rev 7386)
@@ -993,9 +993,15 @@
.float waslinked;
.float cp_bob_spd;
.vector cp_origin, cp_bob_origin, cp_bob_dmg;
+
+float ons_notification_time_team1;
+float ons_notification_time_team2;
+
void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
entity oself;
+ float nag;
+
if (damage <= 0)
return;
if (self.owner.isshielded)
@@ -1012,7 +1018,28 @@
if (time > self.pain_finished)
if (attacker.classname == "player")
{
- play2team(self.team, "onslaught/controlpoint_underattack.wav");
+ if(self.team == COLOR_TEAM1)
+ {
+ if(time - ons_notification_time_team1 > 10)
+ {
+ nag = TRUE;
+ ons_notification_time_team1 = time;
+ }
+ }
+ else if(self.team == COLOR_TEAM2)
+ {
+ if(time - ons_notification_time_team2 > 10)
+ {
+ nag = TRUE;
+ ons_notification_time_team2 = time;
+ }
+ }
+ else
+ nag = TRUE;
+
+ if(nag)
+ play2team(self.team, "onslaught/controlpoint_underattack.wav");
+
self.pain_finished = time + 10;
}
self.health = self.health - damage;
@@ -1398,7 +1425,7 @@
cc = (COLOR_TEAM2 - 1) * 0x11;
else
cc = 0;
-
+
//print(etos(self), " rp=", ftos(redpower), " bp=", ftos(bluepower), " ");
//print("cc=", ftos(cc), "\n");
More information about the nexuiz-commits
mailing list