]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/hitplot.qc
Merge branch 'master' into martin-t/rpc-acc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / hitplot.qc
index 89cec6aea98dacaadca0f44df7c58e82e63653c1..e6bdd00d2b8e3163f2e51f090584fbd37008dd80 100644 (file)
@@ -1,5 +1,7 @@
 #include "hitplot.qh"
 
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
 #include "../antilag.qh"
 #include "../g_subs.qh"
 #include <common/weapons/_all.qh>
@@ -52,7 +54,7 @@ vector W_HitPlotNormalizedUntransform(vector org, entity targ, vector screenforw
        return ret;
 }
 
-void W_HitPlotAnalysis(entity player, .entity weaponentity, vector screenforward, vector screenright, vector screenup)
+void W_HitPlotAnalysis(entity player, entity wep, vector screenforward, vector screenright, vector screenup)
 {
        if(CS(player).hitplotfh >= 0)
        {
@@ -70,7 +72,7 @@ void W_HitPlotAnalysis(entity player, .entity weaponentity, vector screenforward
                        antilag_takeback(trace_ent, store, time - lag);
                        vector hitplot = W_HitPlotNormalizedUntransform(org, trace_ent, screenforward, screenright, screenup, trace_endpos);
                        antilag_restore(trace_ent, store);
-                       fputs(CS(player).hitplotfh, strcat(ftos(hitplot.x), " ", ftos(hitplot.y), " ", ftos(hitplot.z), " ", ftos(player.(weaponentity).m_switchweapon.m_id), "\n"));
+                       fputs(CS(player).hitplotfh, strcat(ftos(hitplot.x), " ", ftos(hitplot.y), " ", ftos(hitplot.z), " ", ftos(wep.m_id), "\n"));
                        //print(strcat(ftos(hitplot_x), " ", ftos(hitplot_y), " ", ftos(hitplot_z), "\n"));
                }
        }