mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 12:01:43 +00:00
Fix SZ_GetSpace server crashes
See https://github.com/Novum/vkQuake/pull/438. Also see https://github.com/andrei-drexler/ironwail/issues/32 Note: Changing that 24 to 39 does prevent the crash, but the buffer size is still insufficient, so some entities (e.g. nails) are missing occasionally. A MAX_DATAGRAM of 48000 seems enough to fix that (MAX_DATAGRAM in ironwail has been bumped to 64000.) Long term though, it would be much better to add support for pkt fragmentation like in QSS since this jumbo packet size is only used in single- player mode - multiplayer uses the much smaller value of DATAGRAM_MTU (just 1400 bytes.)
This commit is contained in:
parent
32b1ebb828
commit
6cf0547d01
1 changed files with 5 additions and 3 deletions
|
@ -597,9 +597,11 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
||||||
continue; // not visible
|
continue; // not visible
|
||||||
}
|
}
|
||||||
|
|
||||||
//johnfitz -- max size for protocol 15 is 18 bytes, not 16 as originally
|
// johnfitz -- max size for protocol 15 is 18 bytes, not 16 as originally
|
||||||
//assumed here. And, for protocol 85 the max size is actually 24 bytes.
|
// assumed here. And, for protocol 85 the max size is actually 24 bytes.
|
||||||
if (msg->cursize + 24 > msg->maxsize)
|
// For float coords and angles the limit is 39.
|
||||||
|
// FIXME: Use tighter limit according to protocol flags and send bits.
|
||||||
|
if (msg->cursize + 39 > msg->maxsize)
|
||||||
{
|
{
|
||||||
//johnfitz -- less spammy overflow message
|
//johnfitz -- less spammy overflow message
|
||||||
if (!dev_overflows.packetsize || dev_overflows.packetsize + CONSOLE_RESPAM_TIME < realtime )
|
if (!dev_overflows.packetsize || dev_overflows.packetsize + CONSOLE_RESPAM_TIME < realtime )
|
||||||
|
|
Loading…
Reference in a new issue