mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
don't process server packets when a client packet has been read from a demo
file. this was causing server packets to sometimes be processed multiple times.
This commit is contained in:
parent
0a90ddc51f
commit
bde0f94d1a
2 changed files with 4 additions and 0 deletions
|
@ -246,6 +246,7 @@ CL_GetDemoMessage (void)
|
|||
switch (c) {
|
||||
case dem_cmd:
|
||||
// user sent input
|
||||
net_message->message->cursize = -1;
|
||||
i = cls.netchan.outgoing_sequence & UPDATE_MASK;
|
||||
pcmd = &cl.frames[i].cmd;
|
||||
r = Qread (cls.demofile, pcmd, sizeof (*pcmd));
|
||||
|
|
|
@ -1009,6 +1009,9 @@ CL_ReadPackets (void)
|
|||
// while (NET_GetPacket ())
|
||||
while (CL_GetMessage ()) {
|
||||
|
||||
if (net_message->message->cursize == -1)
|
||||
continue;
|
||||
|
||||
if (cls.demoplayback && net_packetlog->int_val)
|
||||
Log_Incoming_Packet(net_message->message->data,
|
||||
net_message->message->cursize);
|
||||
|
|
Loading…
Reference in a new issue