Support demos recorded by qizmo.

I guess it's just part of how qizmo works, but a few extra packets get into
the demo before the packet with the serverdata svc :/ More checking needs
to be done (only the initial connect packet is checked), but this works for
now.
This commit is contained in:
Bill Currie 2012-06-16 13:15:48 +09:00
parent 2897dc5a16
commit b0b07d09b9
1 changed files with 11 additions and 0 deletions

View File

@ -943,6 +943,17 @@ demo_check_qwd_mvd (void)
ret = 1; ret = 1;
goto done; goto done;
} }
if ((f = get_float (buf + 0)) >= 0 && !isinf (f) && !isnan (f)
&& buf[4] == dem_read && get_ulong (buf + 5) == 5
&& get_ulong (buf + 9) == 0xffffffff && buf[13] == S2C_CONNECTION) {
//FIXME for now, assuming this is qwd (recorded by qizmo)
//the particular sequence seems to be:
// dem_read S2C_CONNECTION
// dem_cmd
// dem_read real start packet (with print, even:P)
ret = 1;
goto done;
}
if (buf[0] != 0 || (buf[1] != dem_read && buf[1] != dem_all) if (buf[0] != 0 || (buf[1] != dem_read && buf[1] != dem_all)
|| (u = get_ulong (buf + 2)) > MAX_DEMMSG) || (u = get_ulong (buf + 2)) > MAX_DEMMSG)
goto done; goto done;