r4772 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Oct 16 11:52:35 EDT 2008
Author: div0
Date: 2008-10-16 11:52:35 -0400 (Thu, 16 Oct 2008)
New Revision: 4772
Modified:
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/g_damage.qc
Log:
delay teamkill sound
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-10-16 15:36:56 UTC (rev 4771)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-10-16 15:52:35 UTC (rev 4772)
@@ -2237,6 +2237,22 @@
if(g_race)
race_InitSpectator();
}
+
+ if(self.teamkill_soundtime)
+ if(time > self.teamkill_soundtime)
+ {
+ self.teamkill_soundtime = 0;
+
+ entity oldpusher, oldself;
+
+ oldself = self; self = self.teamkill_soundsource;
+ oldpusher = self.pusher; self.pusher = oldself;
+
+ VoiceMessage("teamshoot_auto");
+
+ self.pusher = oldpusher;
+ self = oldself;
+ }
}
Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc 2008-10-16 15:36:56 UTC (rev 4771)
+++ trunk/data/qcsrc/server/g_damage.qc 2008-10-16 15:52:35 UTC (rev 4772)
@@ -6,6 +6,8 @@
float headshot;
.float teamkill_complain;
+.float teamkill_soundtime;
+.entity teamkill_soundsource;
.entity pusher;
@@ -718,14 +720,9 @@
attacker.typehitsound += 1; // TODO possibly trigger teamkill complain sound!
if(time > attacker.teamkill_complain)
{
- entity oldpusher;
-
- // note: here, self is actually targ!
- oldpusher = self.pusher; self.pusher = attacker;
- VoiceMessage("teamshoot_auto");
- self.pusher = oldpusher;
-
attacker.teamkill_complain = time + 5;
+ attacker.teamkill_soundtime = time + 0.5;
+ attacker.teamkill_soundsource = targ;
}
}
}
More information about the nexuiz-commits
mailing list