Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kart-Public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
James R.
Kart-Public
Commits
e4a5f210
Commit
e4a5f210
authored
6 years ago
by
James R.
Browse files
Options
Downloads
Patches
Plain Diff
Convert caret color codes to SRB2 color codes
parent
26227677
No related branches found
No related tags found
1 merge request
!2
lol xd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/d_clisrv.c
+3
-0
3 additions, 0 deletions
src/d_clisrv.c
with
3 additions
and
0 deletions
src/d_clisrv.c
+
3
−
0
View file @
e4a5f210
...
@@ -3932,12 +3932,15 @@ static void HandleTimeout(SINT8 node)
...
@@ -3932,12 +3932,15 @@ static void HandleTimeout(SINT8 node)
*/
*/
static
void
HandleServerInfo
(
SINT8
node
)
static
void
HandleServerInfo
(
SINT8
node
)
{
{
char
servername
[
MAXSERVERNAME
];
// compute ping in ms
// compute ping in ms
const
tic_t
ticnow
=
I_GetTime
();
const
tic_t
ticnow
=
I_GetTime
();
const
tic_t
ticthen
=
(
tic_t
)
LONG
(
netbuffer
->
u
.
serverinfo
.
time
);
const
tic_t
ticthen
=
(
tic_t
)
LONG
(
netbuffer
->
u
.
serverinfo
.
time
);
const
tic_t
ticdiff
=
(
ticnow
-
ticthen
)
*
1000
/
NEWTICRATE
;
const
tic_t
ticdiff
=
(
ticnow
-
ticthen
)
*
1000
/
NEWTICRATE
;
netbuffer
->
u
.
serverinfo
.
time
=
(
tic_t
)
LONG
(
ticdiff
);
netbuffer
->
u
.
serverinfo
.
time
=
(
tic_t
)
LONG
(
ticdiff
);
netbuffer
->
u
.
serverinfo
.
servername
[
MAXSERVERNAME
-
1
]
=
0
;
netbuffer
->
u
.
serverinfo
.
servername
[
MAXSERVERNAME
-
1
]
=
0
;
memcpy
(
servername
,
netbuffer
->
u
.
serverinfo
.
servername
,
MAXSERVERNAME
);
CopyCaretColors
(
netbuffer
->
u
.
serverinfo
.
servername
,
servername
,
MAXSERVERNAME
);
netbuffer
->
u
.
serverinfo
.
gametype
=
(
UINT8
)((
netbuffer
->
u
.
serverinfo
.
gametype
==
VANILLA_GT_MATCH
)
?
GT_MATCH
:
GT_RACE
);
netbuffer
->
u
.
serverinfo
.
gametype
=
(
UINT8
)((
netbuffer
->
u
.
serverinfo
.
gametype
==
VANILLA_GT_MATCH
)
?
GT_MATCH
:
GT_RACE
);
SL_InsertServer
(
&
netbuffer
->
u
.
serverinfo
,
node
);
SL_InsertServer
(
&
netbuffer
->
u
.
serverinfo
,
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