summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_ents.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index 17f1a7d..61b1acf 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -947,11 +947,22 @@ static void CG_CalcEntityLerpPositions( centity_t *cent )
return;
}
- if( cg_projectileNudge.integer > 0 &&
- cent->currentState.eType == ET_MISSILE &&
- !( cg.snap->ps.pm_flags & PMF_FOLLOW ) )
+ // cg_projectileNudge:
+ // 0 = no nudge
+ // 1 = ping based nudge only if unlagged and not playing a demo
+ // 2 = ping based nudge
+ // other = custom nudge
+ if( cg_projectileNudge.integer != 0 &&
+ cent->currentState.eType == ET_MISSILE &&
+ !( cg.snap->ps.pm_flags & PMF_FOLLOW ) )
{
- timeshift = cg.ping;
+ if( cg_projectileNudge.integer == 1 )
+ if( cg_unlagged.integer && !cg.demoPlayback )
+ timeshift = cg.ping;
+ else if ( cg_projectileNudge.integer == 2 )
+ timeshift = cg.ping;
+ else
+ timeshift = cg_projectileNudge.integer;
}
// just use the current frame and evaluate as best we can