2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-14 15:48:04 +03:00

Add CVar sv_allowupload check on netchat validate

This commit is contained in:
Sergey Shorokhov 2020-10-06 19:22:40 +03:00
parent 462484a644
commit 43f162de05

View File

@ -649,7 +649,7 @@ qboolean Netchan_Validate(netchan_t *chan, qboolean *frag_message, unsigned int
// total fragments should be <= MAX_FRAGMENTS and current fragment can't be > total fragments
if (i == FRAG_NORMAL_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_NORMAL_FRAGMENTS)
return FALSE;
if (i == FRAG_FILE_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS)
if (i == FRAG_FILE_STREAM && (!sv_allow_upload.value || FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS))
return FALSE;
if (FRAG_GETID(fragid[i]) > FRAG_GETCOUNT(fragid[i]))
return FALSE;