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
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
Anton Retro Jr.
SRB2
Commits
e0730596
Commit
e0730596
authored
9 years ago
by
Yukita Mayako
Browse files
Options
Downloads
Patches
Plain Diff
Some cleaning up~
parent
db6890ab
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/d_clisrv.h
+1
-0
1 addition, 0 deletions
src/d_clisrv.h
src/d_enet.c
+7
-10
7 additions, 10 deletions
src/d_enet.c
src/d_enet.h
+0
-3
0 additions, 3 deletions
src/d_enet.h
with
8 additions
and
13 deletions
src/d_clisrv.h
+
1
−
0
View file @
e0730596
...
@@ -270,6 +270,7 @@ void SV_ResetServer(void);
...
@@ -270,6 +270,7 @@ void SV_ResetServer(void);
void
CL_AddSplitscreenPlayer
(
void
);
void
CL_AddSplitscreenPlayer
(
void
);
void
CL_RemoveSplitscreenPlayer
(
void
);
void
CL_RemoveSplitscreenPlayer
(
void
);
void
CL_Reset
(
void
);
void
CL_Reset
(
void
);
void
D_SaveBan
(
void
);
// in the middle of frikking nowhere
void
CL_ClearPlayer
(
INT32
playernum
);
void
CL_ClearPlayer
(
INT32
playernum
);
void
CL_UpdateServerList
(
boolean
internetsearch
,
INT32
room
);
void
CL_UpdateServerList
(
boolean
internetsearch
,
INT32
room
);
// is there a game running
// is there a game running
...
...
This diff is collapsed.
Click to expand it.
src/d_enet.c
+
7
−
10
View file @
e0730596
...
@@ -21,6 +21,7 @@ enum {
...
@@ -21,6 +21,7 @@ enum {
DISCONNECT_UNKNOWN
=
0
,
DISCONNECT_UNKNOWN
=
0
,
DISCONNECT_SHUTDOWN
,
DISCONNECT_SHUTDOWN
,
DISCONNECT_FULL
,
DISCONNECT_FULL
,
DISCONNECT_VERSION
,
CLIENT_ASKMSINFO
=
0
,
CLIENT_ASKMSINFO
=
0
,
CLIENT_JOIN
,
CLIENT_JOIN
,
...
@@ -55,7 +56,12 @@ static void ServerHandlePacket(UINT8 node, DataWrap data)
...
@@ -55,7 +56,12 @@ static void ServerHandlePacket(UINT8 node, DataWrap data)
UINT16
version
=
data
->
ReadUINT16
(
data
);
UINT16
version
=
data
->
ReadUINT16
(
data
);
UINT16
subversion
=
data
->
ReadUINT16
(
data
);
UINT16
subversion
=
data
->
ReadUINT16
(
data
);
if
(
version
!=
VERSION
||
subversion
!=
SUBVERSION
)
if
(
version
!=
VERSION
||
subversion
!=
SUBVERSION
)
{
CONS_Printf
(
"NETWORK: Version mismatch!?
\n
"
);
CONS_Printf
(
"NETWORK: Version mismatch!?
\n
"
);
nodeleaving
[
node
]
=
true
;
enet_peer_disconnect
(
nodetopeer
[
node
],
DISCONNECT_VERSION
);
break
;
}
char
*
name
=
data
->
ReadStringn
(
data
,
MAXPLAYERNAME
);
char
*
name
=
data
->
ReadStringn
(
data
,
MAXPLAYERNAME
);
CONS_Printf
(
"NETWORK: Player '%s' joining...
\n
"
,
name
);
CONS_Printf
(
"NETWORK: Player '%s' joining...
\n
"
,
name
);
net_playercount
++
;
net_playercount
++
;
...
@@ -193,15 +199,6 @@ void Net_AckTicker(void)
...
@@ -193,15 +199,6 @@ void Net_AckTicker(void)
}
}
}
}
boolean
Net_AllAckReceived
(
void
)
{
return
true
;
}
void
D_SetDoomcom
(
void
)
{
}
void
D_NetOpen
(
void
)
void
D_NetOpen
(
void
)
{
{
ENetAddress
address
=
{
ENET_HOST_ANY
,
5029
};
ENetAddress
address
=
{
ENET_HOST_ANY
,
5029
};
...
@@ -301,7 +298,7 @@ void D_CloseConnection(void)
...
@@ -301,7 +298,7 @@ void D_CloseConnection(void)
if
(
ClientHost
)
if
(
ClientHost
)
{
{
enet_peer_disconnect
(
nodetopeer
[
servernode
],
0
);
enet_peer_disconnect
(
nodetopeer
[
servernode
],
DISCONNECT_SHUTDOWN
);
while
(
enet_host_service
(
ServerHost
,
&
e
,
3000
)
>
0
)
while
(
enet_host_service
(
ServerHost
,
&
e
,
3000
)
>
0
)
{
{
if
(
e
.
type
==
ENET_EVENT_TYPE_DISCONNECT
)
if
(
e
.
type
==
ENET_EVENT_TYPE_DISCONNECT
)
...
...
This diff is collapsed.
Click to expand it.
src/d_enet.h
+
0
−
3
View file @
e0730596
...
@@ -10,9 +10,6 @@ extern boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
...
@@ -10,9 +10,6 @@ extern boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
boolean
Net_GetNetStat
(
void
);
boolean
Net_GetNetStat
(
void
);
void
Net_AckTicker
(
void
);
void
Net_AckTicker
(
void
);
boolean
Net_AllAckReceived
(
void
);
void
D_SetDoomcom
(
void
);
void
D_SaveBan
(
void
);
boolean
D_CheckNetGame
(
void
);
boolean
D_CheckNetGame
(
void
);
void
D_CloseConnection
(
void
);
void
D_CloseConnection
(
void
);
void
Net_CloseConnection
(
INT32
node
);
void
Net_CloseConnection
(
INT32
node
);
...
...
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