Developer knowledge network ยท moderated exchange

Komunitas Kode Tidak Dapat Diandalkan

Riset Pengembang, Rekayasa Terbalik & Komunitas Pengkodean

Knowledge indexHidup
4Categories
919Threads
2.8KPostingan
Analysis

CS2 Server Lag Compensation & Backtracking Tick Math: tick_count - LerpTicks [v2.4 Technical Discussion]

netvar_ninja
Schema Master
MEMBER
Reputasi: 145
Tanggal Bergabung: Nov 2018
Postingan: 16
Terima kasih: 89
1 bulan yang lalu ยท Jul 1, 2026 7:02 PM
#1

How CS2 server backtrack validation operates in Source 2:

When a shot usercmd is received, the dedicated server rewinds the target player hitboxes to the exact historical client render tick:

$$\text{TargetTick} = \text{ServerTick} - \text{LatencyTicks} - \text{LerpTicks}$$

Where:

  • $\text{LerpTicks} = \frac{\text{cl_interp}}{\text{interval_per_tick}}$
  • Server stores up to 64 historical player record ticks (approx. 1000ms window).

If you store the past 12 ticks of CSkeletonInstance bone matrices per enemy, you can hit targets during high-ping player peeks reliably!

matrix_math_guy
Math Specialist
MEMBER
Reputasi: 105
Tanggal Bergabung: Aug 2018
Postingan: 52
Terima kasih: 41
1 bulan yang lalu ยท Jul 2, 2026 12:32 AM
#2

Clean breakdown of sub-tick latency compensation math. Storing the past 12 ticks of bone matrices is the standard approach.

vtable_slayer
Senior Reverser
MEMBER
Reputasi: 215
Tanggal Bergabung: Mar 2018
Postingan: 86
Terima kasih: 61
1 bulan yang lalu ยท Jul 2, 2026 7:14 AM
#3

Make sure you filter out ticks where the enemy player was dead or in teleports to prevent invalid hitbox rewinds.