Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skydusk
SRB2
Commits
244414eb
Commit
244414eb
authored
3 months ago
by
Hanicef
Browse files
Options
Downloads
Patches
Plain Diff
Remove maxsend limits
parent
2ff7c610
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/netcode/d_netfil.c
+3
-3
3 additions, 3 deletions
src/netcode/d_netfil.c
with
3 additions
and
3 deletions
src/netcode/d_netfil.c
+
3
−
3
View file @
244414eb
...
@@ -129,7 +129,7 @@ boolean waitingforluafilecommand = false;
...
@@ -129,7 +129,7 @@ boolean waitingforluafilecommand = false;
char
luafiledir
[
256
+
16
]
=
"luafiles"
;
char
luafiledir
[
256
+
16
]
=
"luafiles"
;
// max file size to send to a player (in kilobytes)
// max file size to send to a player (in kilobytes)
static
CV_PossibleValue_t
maxsend_cons_t
[]
=
{{
0
,
"MIN"
},
{
204800
,
"MAX"
},
{
0
,
NULL
}};
static
CV_PossibleValue_t
maxsend_cons_t
[]
=
{{
-
1
,
"MIN"
},
{
999999999
,
"MAX"
},
{
0
,
NULL
}};
consvar_t
cv_maxsend
=
CVAR_INIT
(
"maxsend"
,
"4096"
,
CV_SAVE
|
CV_NETVAR
,
maxsend_cons_t
,
NULL
);
consvar_t
cv_maxsend
=
CVAR_INIT
(
"maxsend"
,
"4096"
,
CV_SAVE
|
CV_NETVAR
,
maxsend_cons_t
,
NULL
);
consvar_t
cv_noticedownload
=
CVAR_INIT
(
"noticedownload"
,
"Off"
,
CV_SAVE
|
CV_NETVAR
,
CV_OnOff
,
NULL
);
consvar_t
cv_noticedownload
=
CVAR_INIT
(
"noticedownload"
,
"Off"
,
CV_SAVE
|
CV_NETVAR
,
CV_OnOff
,
NULL
);
...
@@ -206,7 +206,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
...
@@ -206,7 +206,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
// Store in the upper four bits
// Store in the upper four bits
if
(
!
cv_downloading
.
value
)
if
(
!
cv_downloading
.
value
)
filestatus
+=
(
WILLSEND_NO
<<
4
);
// Won't send
filestatus
+=
(
WILLSEND_NO
<<
4
);
// Won't send
else
if
(
wadfiles
[
i
]
->
filesize
<=
(
UINT32
)
cv_maxsend
.
value
*
1024
)
else
if
(
cv_maxsend
.
value
==
-
1
||
wadfiles
[
i
]
->
filesize
<=
(
UINT32
)
cv_maxsend
.
value
*
1024
)
filestatus
+=
(
WILLSEND_YES
<<
4
);
// Will send if requested
filestatus
+=
(
WILLSEND_YES
<<
4
);
// Will send if requested
else
else
filestatus
+=
(
WILLSEND_TOOLARGE
<<
4
);
// Won't send, too big
filestatus
+=
(
WILLSEND_TOOLARGE
<<
4
);
// Won't send, too big
...
@@ -849,7 +849,7 @@ static boolean AddFileToSendQueue(INT32 node, UINT8 fileid)
...
@@ -849,7 +849,7 @@ static boolean AddFileToSendQueue(INT32 node, UINT8 fileid)
strlcpy
(
p
->
id
.
filename
,
wadfiles
[
wadnum
]
->
filename
,
MAX_WADPATH
);
strlcpy
(
p
->
id
.
filename
,
wadfiles
[
wadnum
]
->
filename
,
MAX_WADPATH
);
// Handle huge file requests (i.e. bigger than cv_maxsend.value KB)
// Handle huge file requests (i.e. bigger than cv_maxsend.value KB)
if
(
wadfiles
[
wadnum
]
->
filesize
>
(
UINT32
)
cv_maxsend
.
value
*
1024
)
if
(
cv_maxsend
.
value
!=
-
1
&&
wadfiles
[
wadnum
]
->
filesize
>
(
UINT32
)
cv_maxsend
.
value
*
1024
)
{
{
// Too big
// Too big
// Don't inform client (client sucks, man)
// Don't inform client (client sucks, man)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment