]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/hitplot.qc
Transifex autosync
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / hitplot.qc
index fb13bd1b9e126201de97ef73bf439f4119a6a97e..c42d88b977bcd265607be7f07bb088a643d21266 100644 (file)
@@ -1,12 +1,13 @@
 #include "hitplot.qh"
 
-#include <server/defs.qh>
-#include <server/miscfunctions.qh>
-#include "../antilag.qh"
-#include "../g_subs.qh"
-#include <common/weapons/_all.qh>
 #include <common/state.qh>
+#include <common/stats.qh>
+#include <common/weapons/_all.qh>
+#include <common/weapons/_all.qh>
 #include <common/wepent.qh>
+#include <server/antilag.qh>
+#include <server/client.qh>
+#include <server/world.qh>
 
 vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v)
 {
@@ -54,7 +55,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)
        {
@@ -72,7 +73,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"));
                }
        }
@@ -83,7 +84,7 @@ void W_HitPlotOpen(entity player)
        if(autocvar_g_hitplots || strhasword(autocvar_g_hitplots_individuals, player.netaddress))
        {
                CS(player).hitplotfh = fopen(strcat("hits-", matchid, "-", player.netaddress, "-", ftos(player.playerid), ".plot"), FILE_WRITE);
-               fputs(CS(player).hitplotfh, strcat("#name ", playername(player, false), "\n"));
+               fputs(CS(player).hitplotfh, strcat("#name ", playername(player.netname, player.team, false), "\n"));
        }
        else { CS(player).hitplotfh = -1; }
 }