]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/tracing.qc
gitlab-ci: run unit tests
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / tracing.qc
index 9827f0abe4e0952adef6541e1e98e3f4b34d5f8b..01a23c1a5caf3cd6e66911e3066442f39a35268a 100644 (file)
@@ -9,12 +9,12 @@
 #include "../g_subs.qh"
 #include "../antilag.qh"
 
-#include "../../common/constants.qh"
-#include "../../common/util.qh"
+#include <common/constants.qh>
+#include <common/util.qh>
 
-#include "../../common/weapons/all.qh"
+#include <common/weapons/all.qh>
 
-#include "../../lib/warpzone/common.qh"
+#include <lib/warpzone/common.qh>
 
 // this function calculates w_shotorg and w_shotdir based on the weapon model
 // offset, trueaim and antilag, and won't put w_shotorg inside a wall.
@@ -53,7 +53,8 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
        if (IS_PLAYER(ent) && accuracy_canbegooddamage(ent))
                accuracy_add(ent, PS(ent).m_weapon.m_id, maxdamage, 0);
 
-       W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
+       if(IS_PLAYER(ent))
+               W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
 
        .entity weaponentity = weaponentities[0]; // TODO: unhardcode
        vector md = ent.(weaponentity).movedir;
@@ -296,13 +297,6 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
                                soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, snd, VOL_BASE * f, ATTEN_NONE);
                        }
                ));
-               FOR_EACH_REALCLIENT(msg_entity)
-               if(msg_entity != self)
-               if(!msg_entity.railgunhit)
-               if(!(IS_SPEC(msg_entity) && msg_entity.enemy == self)) // we use realclient, so spectators can hear the whoosh too
-               {
-                       
-               }
 
                if(pseudoprojectile)
                        remove(pseudoprojectile);