[nexuiz-commits] r7511 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Aug 24 05:53:55 EDT 2009
Author: div0
Date: 2009-08-24 05:53:55 -0400 (Mon, 24 Aug 2009)
New Revision: 7511
Modified:
trunk/data/qcsrc/server/w_common.qc
Log:
fix nex whoosh spamming misc_laser
Modified: trunk/data/qcsrc/server/w_common.qc
===================================================================
--- trunk/data/qcsrc/server/w_common.qc 2009-08-23 21:25:55 UTC (rev 7510)
+++ trunk/data/qcsrc/server/w_common.qc 2009-08-24 09:53:55 UTC (rev 7511)
@@ -97,24 +97,27 @@
//explosion = spawn();
// Find all non-hit players the beam passed close by
- FOR_EACH_REALCLIENT(msg_entity) if(msg_entity != self) if(!msg_entity.railgunhit) // we use realclient, so spectators can hear the whoosh too
+ if(deathtype == WEP_MINSTANEX || deathtype == WEP_NEX)
{
- // nearest point on the beam
- beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);
+ FOR_EACH_REALCLIENT(msg_entity) if(msg_entity != self) if(!msg_entity.railgunhit) // we use realclient, so spectators can hear the whoosh too
+ {
+ // nearest point on the beam
+ beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);
- f = bound(0, 1 - vlen(beampos - msg_entity.origin) / 512, 1);
- if(f <= 0)
- continue;
+ f = bound(0, 1 - vlen(beampos - msg_entity.origin) / 512, 1);
+ if(f <= 0)
+ continue;
- snd = strcat("weapons/nexwhoosh", ftos(floor(random() * 3) + 1), ".wav");
+ snd = strcat("weapons/nexwhoosh", ftos(floor(random() * 3) + 1), ".wav");
- if(!pseudoprojectile)
- pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume
- soundtoat(MSG_ONE, pseudoprojectile, beampos, CHAN_PROJECTILE, snd, VOL_BASE * f, ATTN_NONE);
- }
+ if(!pseudoprojectile)
+ pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume
+ soundtoat(MSG_ONE, pseudoprojectile, beampos, CHAN_PROJECTILE, snd, VOL_BASE * f, ATTN_NONE);
+ }
- if(pseudoprojectile)
- remove(pseudoprojectile);
+ if(pseudoprojectile)
+ remove(pseudoprojectile);
+ }
// find all the entities the railgun hit and hurt them
ent = findfloat(world, railgunhit, TRUE);
More information about the nexuiz-commits
mailing list