From 532e79bca6b22db1a4054138e8a5c658389d57fe Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 1 Dec 2010 08:11:45 +0900 Subject: [PATCH] Limit the amount of time that MVDs can skip. Trying to cover very long times will probably cause more problems than it fixes, so limit the length of time. Two seconds aught to be enough for now. Need to look into proper handling of prevtime. --- qw/source/sv_recorder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qw/source/sv_recorder.c b/qw/source/sv_recorder.c index 89db95f82..e730762c6 100644 --- a/qw/source/sv_recorder.c +++ b/qw/source/sv_recorder.c @@ -165,6 +165,8 @@ write_msg (sizebuf_t *msg, int type, int to, float time, sizebuf_t *dst) msec = (time - prevtime) * 1000; prevtime += msec * 0.001; + if (msec > 2000) + msec = 2000; while (msec > 250) { //the maximum interval we can send is 255ms, but that's nasty with //floats, so keep things to a nice round number of 250ms (0.25 is float