summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <trem.redman@gmail.com>2013-09-14 15:16:41 -0700
committerPaweł Redman <trem.redman@gmail.com>2013-09-14 15:16:41 -0700
commitf82031746211f4d4149ba229fc27e191e97bb7c8 (patch)
treeaa1be7abf7b25de53b9347ccc55df81b5e481819
parent09460bd0361b0ad85ea890de6780476cc5fd8a16 (diff)
parent3c9a5c2408d05cb1663b5fe81f34d9a8a255a218 (diff)
Merge pull request #7 from ZdrytchX/patch-7
Updated cg_projectilenudge
-rw-r--r--src/cgame/cg_ents.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index a68c5eb..339cd8e 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -939,12 +939,24 @@ static void CG_CalcEntityLerpPositions( centity_t *cent )
return;
}
- if( cg_projectileNudge.integer &&
- !cg.demoPlayback &&
- cent->currentState.eType == ET_MISSILE &&
+ if( cent->currentState.eType == ET_MISSILE &&
!( cg.snap->ps.pm_flags & PMF_FOLLOW ) )
{
+ //Default setting, people don't like having to see
+ //projectilenudge with lagged as it screws up their aim
+ if(cg_projectileNudge.integer == 1 &&
+ !cg.demoPlayback && cg_unlagged.integer)
timeshift = cg.ping;
+ //Previous default
+ if(cg_projectileNudge.integer == 2 &&
+ !cg.demoPlayback)
+ timeshift = cg.ping;
+ //Extrapolate using the value instead of ping
+ //for those who think their ping isn't 'real'
+ else if( cg_projectileNudge.integer > 2)
+ timeshift = cg_projectileNudge.integer;
+
+ else timeshift = 0;
}
// just use the current frame and evaluate as best we can