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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bitten2up
SRB2
Commits
bf9cfc67
Commit
bf9cfc67
authored
1 year ago
by
bitten2up
Browse files
Options
Downloads
Patches
Plain Diff
starting to document netcode
parent
a373d96d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hu_stuff.c
+2
-0
2 additions, 0 deletions
src/hu_stuff.c
src/netcode/net_command.c
+4
-2
4 additions, 2 deletions
src/netcode/net_command.c
with
6 additions
and
2 deletions
src/hu_stuff.c
+
2
−
0
View file @
bf9cfc67
...
...
@@ -641,6 +641,8 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
msg
=
(
char
*
)
*
p
;
SKIPSTRINGL
(
*
p
,
HU_MAXMSGLEN
+
1
);
// check if player is sending a say command while muted
// or if they are sending a csay and are not an admin
if
((
cv_mute
.
value
||
flags
&
(
HU_CSAY
|
HU_SERVER_SAY
))
&&
playernum
!=
serverplayer
&&
!
(
IsPlayerAdmin
(
playernum
)))
{
CONS_Alert
(
CONS_WARNING
,
cv_mute
.
value
?
...
...
This diff is collapsed.
Click to expand it.
src/netcode/net_command.c
+
4
−
2
View file @
bf9cfc67
...
...
@@ -39,6 +39,7 @@ void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum))
void
SendNetXCmd
(
netxcmd_t
id
,
const
void
*
param
,
size_t
nparam
)
{
// +1 for the size and another +1 for the ID.
if
(
localtextcmd
[
0
]
+
2
+
nparam
>
MAXTEXTCMD
)
{
// for future reference: if (cv_debug) != debug disabled.
...
...
@@ -57,6 +58,7 @@ void SendNetXCmd(netxcmd_t id, const void *param, size_t nparam)
// splitscreen player
void
SendNetXCmd2
(
netxcmd_t
id
,
const
void
*
param
,
size_t
nparam
)
{
// +1 for the size and another +1 for the ID.
if
(
localtextcmd2
[
0
]
+
2
+
nparam
>
MAXTEXTCMD
)
{
I_Error
(
"No more place in the buffer for netcmd %d
\n
"
,
id
);
...
...
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