[nexuiz-commits] r6703 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon May 11 06:24:19 EDT 2009
Author: div0
Date: 2009-05-11 06:24:18 -0400 (Mon, 11 May 2009)
New Revision: 6703
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
handle antilag for bots correctly for hitplot purposes
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-05-10 19:20:37 UTC (rev 6702)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-05-11 10:24:18 UTC (rev 6703)
@@ -79,6 +79,11 @@
if(player.hitplotfh >= 0)
{
lag = ANTILAG_LATENCY(player);
+ if(lag < 0.001)
+ lag = 0;
+ if(clienttype(player) != CLIENTTYPE_REAL)
+ lag = 0; // only antilag for clients
+
org = player.origin + player.view_ofs;
traceline_antilag_force(player, org, org + screenforward * MAX_SHOT_DISTANCE, MOVE_NORMAL, player, lag);
if(trace_ent.flags & FL_CLIENT)
@@ -87,6 +92,7 @@
hitplot = W_HitPlotNormalizedUntransform(org, trace_ent, screenforward, screenright, screenup, trace_endpos);
antilag_restore(trace_ent);
fputs(player.hitplotfh, strcat(ftos(hitplot_x), " ", ftos(hitplot_y), " ", ftos(hitplot_z), "\n"));
+ print(strcat(ftos(hitplot_x), " ", ftos(hitplot_y), " ", ftos(hitplot_z), "\n"));
}
}
}
More information about the nexuiz-commits
mailing list