]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix too spammy vortex whoosh sound (it was ignored where the beam really ends)
authorterencehill <piuntn@gmail.com>
Thu, 25 Jul 2019 08:39:43 +0000 (10:39 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 25 Jul 2019 08:59:08 +0000 (10:59 +0200)
qcsrc/server/weapons/tracing.qc

index dfa1389721aa456db09d41381b607e5688bbc584..c2d1de11ec8abf709d1903d9bf25b70be297e6e7 100644 (file)
@@ -216,7 +216,7 @@ void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector
        entity pseudoprojectile = NULL;
 
        vector dir = normalize(end - start);
-       float length = vlen(end - start);
+       //float max_length = vlen(end - start);
        vector force = dir * bforce;
 
        // go a little bit into the wall because we need to hit this wall later
@@ -277,6 +277,7 @@ void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector
        //explosion = spawn();
 
        // Find all non-hit players the beam passed close by
+       float length = vlen(trace_endpos - start);
        if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id) // WEAPONTODO
        {
                FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, {