[nexuiz-commits] r8052 - in branches/nexuiz-2.0: . data data/qcsrc/client data/qcsrc/common data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Oct 4 07:36:31 EDT 2009
Author: div0
Date: 2009-10-04 07:36:31 -0400 (Sun, 04 Oct 2009)
New Revision: 8052
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/balance.cfg
branches/nexuiz-2.0/data/balance25.cfg
branches/nexuiz-2.0/data/balanceHavoc.cfg
branches/nexuiz-2.0/data/balanceSamual.cfg
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/qcsrc/client/projectile.qc
branches/nexuiz-2.0/data/qcsrc/common/constants.qh
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/constants.qh
branches/nexuiz-2.0/data/qcsrc/server/defs.qh
branches/nexuiz-2.0/data/qcsrc/server/g_subs.qc
branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc
branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
Log:
r8050 | div0 | 2009-10-04 07:24:11 -0400 (Sun, 04 Oct 2009) | 3 lines
cl_noantilag
g_balance_campingrifle_tracer
r8051 | div0 | 2009-10-04 07:27:19 -0400 (Sun, 04 Oct 2009) | 2 lines
bring back rifle bullet glow if antilag bulets are off
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/.patchsets 2009-10-04 11:36:31 UTC (rev 8052)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-7990,7993-8048
+revisions_applied = 1-7945,7948-7948,7951-7990,7993-8051
Modified: branches/nexuiz-2.0/data/balance.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance.cfg 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/balance.cfg 2009-10-04 11:36:31 UTC (rev 8052)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
+set cvar_check_balance 78188ae599396a346b72738a042880c5
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -487,6 +487,7 @@
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
+set g_balance_campingrifle_tracer 1
set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
Modified: branches/nexuiz-2.0/data/balance25.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance25.cfg 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/balance25.cfg 2009-10-04 11:36:31 UTC (rev 8052)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
+set cvar_check_balance 78188ae599396a346b72738a042880c5
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -487,6 +487,7 @@
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
+set g_balance_campingrifle_tracer 0
set g_balance_campingrifle_primary_damage 60
set g_balance_campingrifle_primary_headshotaddeddamage 100
set g_balance_campingrifle_primary_spread 0
Modified: branches/nexuiz-2.0/data/balanceHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceHavoc.cfg 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/balanceHavoc.cfg 2009-10-04 11:36:31 UTC (rev 8052)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
+set cvar_check_balance 78188ae599396a346b72738a042880c5
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -487,6 +487,7 @@
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
+set g_balance_campingrifle_tracer 1
set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
Modified: branches/nexuiz-2.0/data/balanceSamual.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceSamual.cfg 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/balanceSamual.cfg 2009-10-04 11:36:31 UTC (rev 8052)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
+set cvar_check_balance 78188ae599396a346b72738a042880c5
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -487,6 +487,7 @@
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
+set g_balance_campingrifle_tracer 1
set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-10-04 11:36:31 UTC (rev 8052)
@@ -1646,3 +1646,5 @@
set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file"
set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file"
+
+seta cl_noantilag 0 "turn this on if you believe antilag is bad"
Modified: branches/nexuiz-2.0/data/qcsrc/client/projectile.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/projectile.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/client/projectile.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -84,6 +84,9 @@
trailparticles(self, particleeffectnum("tr_bullet"), from, to);
break;
case PROJECTILE_BULLET_GLOWING:
+ trailparticles(self, particleeffectnum("tr_bullet"), from, to);
+ break;
+ case PROJECTILE_BULLET_GLOWING_TRACER:
trailparticles(self, particleeffectnum("tr_rifle"), from, to);
break;
case PROJECTILE_FIREMINE:
@@ -177,11 +180,10 @@
switch(self.cnt)
{
- /*
case PROJECTILE_BULLET_GLOWING:
+ case PROJECTILE_BULLET_GLOWING_TRACER:
R_AddDynamicLight(self.origin, 50, '1 1 0');
break;
- */
default:
break;
}
Modified: branches/nexuiz-2.0/data/qcsrc/common/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/constants.qh 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/common/constants.qh 2009-10-04 11:36:31 UTC (rev 8052)
@@ -407,6 +407,7 @@
float PROJECTILE_CRYLINK_BOUNCING = 19;
float PROJECTILE_FIREBALL = 20;
float PROJECTILE_FIREMINE = 21;
+float PROJECTILE_BULLET_GLOWING_TRACER = 22;
float SPECIES_HUMAN = 0;
float SPECIES_ROBOT_SOLID = 1;
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -184,78 +184,9 @@
// calculate the shotdir from the chosen shotorg
w_shotdir = normalize(trueaimpoint - w_shotorg);
-#if 0
- // explanation of g_antilag:
- // if client reports it was aiming at a player, and the serverside trace
- // says it would miss, change the aim point to the player's new origin,
- // but only if the shot at the player's new origin would hit of course
- //
- // FIXME: a much better method for bullet weapons would be to leave a
- // trail of lagged 'ghosts' behind players, and see if the bullet hits the
- // ghost corresponding to this player's ping time, and if so it would do
- // damage to the real player
if (antilag)
- if (ent.cursor_trace_ent) // client was aiming at someone
- if (ent.cursor_trace_ent != ent) // just to make sure
- if (ent.cursor_trace_ent.takedamage) // and that person is killable
- if (ent.cursor_trace_ent.classname == "player") // and actually a player
- if (cvar("g_antilag") == 1)
+ if (!ent.cvar_cl_noantilag)
{
- // verify that the shot would miss without antilag
- // (avoids an issue where guns would always shoot at their origin)
- traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, ent);
- if (!trace_ent.takedamage)
- {
- // verify that the shot would hit if altered
- traceline(w_shotorg, ent.cursor_trace_ent.origin, MOVE_NORMAL, ent);
- if (trace_ent == ent.cursor_trace_ent)
- {
- // verify that the shot would hit in the past
- if(ent.antilag_debug)
- antilag_takeback(ent.cursor_trace_ent, time - ent.antilag_debug);
- else
- antilag_takeback(ent.cursor_trace_ent, time - ANTILAG_LATENCY(ent));
-
- traceline(ent.origin + ent.view_ofs, ent.origin + ent.view_ofs + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, ent);
- antilag_restore(ent.cursor_trace_ent);
-
- if(trace_ent == ent.cursor_trace_ent)
- {
- // HIT!
- w_shotdir = normalize(ent.cursor_trace_ent.origin - w_shotorg);
- dprint("ANTILAG HIT for ", ent.netname, "\n");
- }
- else
- {
- // prydon cursor aimbot or odd network conditions
- dprint("WARNING: antilag ghost trace for ", ent.netname, " failed!\n");
- }
-
- if(cvar("developer") >= 2)
- {
- vector v, vplus, vel;
- float X;
- v = antilag_takebackorigin(ent.cursor_trace_ent, time - (ANTILAG_LATENCY(ent) ));
- vplus = antilag_takebackorigin(ent.cursor_trace_ent, time - (ANTILAG_LATENCY(ent) + 0.01));
- vel = (vplus - v) * (1 / 0.01);
- // solve: v + X * vel = closest to ent.origin + ent.view_ofs, v_forward axis
- v -= (ent.origin + ent.view_ofs);
- // solve: v + X * vel = closest to v_forward axis
- // project into 2D by subtracting v_forward components:
- v -= (v * v_forward) * v_forward;
- vel -= (vel * v_forward) * v_forward;
- // solve: v + X * vel = closest to origin
- // (v + X * vel)^2 closest to 0
- // v^2 + 2 * X * (v * vel) + X^2 * vel^2 closest to 0
- X = -(v * vel) / (vel * vel);
- dprint("dead center needs adjustment of ", ftos(X), " (that is, ", ftos(ANTILAG_LATENCY(ent) + X), " instead of ", ftos(ANTILAG_LATENCY(ent)), "\n");
- }
- }
- }
- }
-#else
- if (antilag)
- {
if (cvar("g_antilag") == 1) // switch to "ghost" if not hitting original
{
traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, ent);
@@ -294,7 +225,6 @@
}
}
}
-#endif
ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-10-04 11:36:31 UTC (rev 8052)
@@ -1,5 +1,5 @@
string CVAR_CHECK_DEFAULT = "091f36c4fb0d7b22bbd2d2fdff8b1447";
-string CVAR_CHECK_BALANCE = "9b590c8f7c3065d917ac8e2e5e842a88";
+string CVAR_CHECK_BALANCE = "78188ae599396a346b72738a042880c5";
float FALSE = 0;
float TRUE = 1;
Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-10-04 11:36:31 UTC (rev 8052)
@@ -338,6 +338,7 @@
float sv_loddistance1;
float sv_loddistance2;
.float cvar_cl_gunalign;
+.float cvar_cl_noantilag;
.float version_nagtime;
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_subs.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_subs.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_subs.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -360,13 +360,13 @@
}
void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
{
- if (cvar("g_antilag") != 2)
+ if (cvar("g_antilag") != 2 || source.cvar_cl_noantilag)
lag = 0;
traceline_antilag_force(source, v1, v2, nomonst, forent, lag);
}
void tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag)
{
- if (cvar("g_antilag") != 2)
+ if (cvar("g_antilag") != 2 || source.cvar_cl_noantilag)
lag = 0;
tracebox_antilag_force(source, v1, mi, ma, v2, nomonst, forent, lag);
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -560,6 +560,7 @@
GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromnexuiz, "cl_forceplayermodelsfromnexuiz");
#endif
GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
+ GetCvars_handleFloatOnce(s, f, cvar_cl_noantilag, "cl_noantilag");
// fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -88,7 +88,7 @@
w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
}
- fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, EF_RED, 1, pBulletConstant);
+ fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
endFireBallisticBullet();
if (cvar("g_casings") >= 2)
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_common.qc 2009-10-04 11:27:19 UTC (rev 8051)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_common.qc 2009-10-04 11:36:31 UTC (rev 8052)
@@ -411,7 +411,7 @@
lag = 0;
if(clienttype(self) != CLIENTTYPE_REAL)
lag = 0;
- if(cvar("g_antilag") == 0)
+ if(cvar("g_antilag") == 0 || self.cvar_cl_noantilag)
lag = 0; // only do hitscan, but no antilag
if(lag)
@@ -488,6 +488,8 @@
}
if(tracereffects & EF_RED)
+ CSQCProjectile(proj, TRUE, PROJECTILE_BULLET_GLOWING_TRACER, TRUE);
+ else if(tracereffects & EF_BLUE)
CSQCProjectile(proj, TRUE, PROJECTILE_BULLET_GLOWING, TRUE);
else
CSQCProjectile(proj, TRUE, PROJECTILE_BULLET, TRUE);
More information about the nexuiz-commits
mailing list