mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qw] Make the netgraph scale logarithmic
Full scale is 1s, but now ms timings are visible even with the default height.
This commit is contained in:
parent
91eeae5186
commit
edbf4d262a
1 changed files with 9 additions and 6 deletions
|
@ -213,15 +213,18 @@ CL_CalcNet (void)
|
||||||
for (i = cls.netchan.outgoing_sequence - UPDATE_BACKUP + 1;
|
for (i = cls.netchan.outgoing_sequence - UPDATE_BACKUP + 1;
|
||||||
i <= cls.netchan.outgoing_sequence; i++) {
|
i <= cls.netchan.outgoing_sequence; i++) {
|
||||||
frame = &cl.frames[i & UPDATE_MASK];
|
frame = &cl.frames[i & UPDATE_MASK];
|
||||||
if (frame->receivedtime == -1)
|
if (frame->receivedtime == -1) {
|
||||||
packet_latency[i & NET_TIMINGSMASK] = 9999; // dropped
|
packet_latency[i & NET_TIMINGSMASK] = 9999; // dropped
|
||||||
else if (frame->receivedtime == -2)
|
} else if (frame->receivedtime == -2) {
|
||||||
packet_latency[i & NET_TIMINGSMASK] = 10000; // choked
|
packet_latency[i & NET_TIMINGSMASK] = 10000; // choked
|
||||||
else if (frame->invalid)
|
} else if (frame->invalid) {
|
||||||
packet_latency[i & NET_TIMINGSMASK] = 9998; // invalid delta
|
packet_latency[i & NET_TIMINGSMASK] = 9998; // invalid delta
|
||||||
else
|
} else {
|
||||||
packet_latency[i & NET_TIMINGSMASK] =
|
double d = frame->receivedtime - frame->senttime;
|
||||||
(frame->receivedtime - frame->senttime) * 20;
|
d = log (d * 1000 + 1) / log (1000);
|
||||||
|
d *= d * cl_netgraph_height->int_val;
|
||||||
|
packet_latency[i & NET_TIMINGSMASK] = d;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lost = 0;
|
lost = 0;
|
||||||
|
|
Loading…
Reference in a new issue