Hi
I was wondering if the ETPro team could give any hints to how etpro displays the correct ping during demo playback. Vanilla ET shows a maxed out ping, although the snapflags are there.
Also can you tell me if there are any commands that restarts a demo, just like map_restart restarts the map. Of cause I could do 'demo chruker1' again and again - but are there something faster?
Correct ping during demo playback
Moderators: Forum moderators, developers
Code: Select all
// add this snapshot's info
- lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping;
+ if (cg.demoPlayback) {
+ static int lasttime = 0;
+ // rain - #67 - display snapshot time delta instead of ping when
+ // playing a demo, since I can't think of any way to get the
+ // real ping
+ lagometer.snapshotSamples[lagometer.snapshotCount & (LAG_SAMPLES - 1)] = snap->serverTime - lasttime;
+ lasttime = snap->serverTime;
+ } else
+ lagometer.snapshotSamples[ lagometer.snapshotCount & ( LAG_SAMPLES - 1) ] = snap->ping;
+