-
Notifications
You must be signed in to change notification settings - Fork 2
/
Refreshx.pas
127 lines (115 loc) · 4.15 KB
/
Refreshx.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{*****************************************************************}
{ }
{ Refreshx structures }
{ for ARSSE }
{ }
{ Copyright (c) 2010 Gregor A. Cieslak (a.k.a. Shoozza) }
{ All rights reserved }
{ }
{ NOT free to distribute or modify }
{ }
{*****************************************************************}
unit Refreshx;
interface
const
PLAYERNAME_CHARS = 24;
MAPNAME_CHARS = 16;
HWID_CHARS = 11;
MAXPLAYERS = 32;
MAXTEAMS = 4;
// REFRESH packets are handled when the occur
REFRESHX_264 = 1; // for Soldatserver version 2.6.4 and older
REFRESHX_265 = 2;
REFRESHX_270 = 3;
type
TMsg_Refresh = packed record
Name: array[1..MAXPLAYERS] of string[PLAYERNAME_CHARS];
Team: array[1..MAXPLAYERS] of byte;
Kills: array[1..MAXPLAYERS] of word;
Deaths: array[1..MAXPLAYERS] of word;
Ping: array[1..MAXPLAYERS] of byte;
Number: array[1..MAXPLAYERS] of byte;
IP: array[1..MAXPLAYERS, 1..4] of byte;
TeamScore: array[1..MAXTEAMS] of word;
MapName: string[MAPNAME_CHARS];
TimeLimit, CurrentTime: integer;
KillLimit: word;
GameStyle: byte;
end;
TMsg_Refreshx_264 = packed record
Name: array[1..MAXPLAYERS] of string[PLAYERNAME_CHARS];
Team: array[1..MAXPLAYERS] of byte;
Kills: array[1..MAXPLAYERS] of word;
Deaths: array[1..MAXPLAYERS] of word;
Ping: array[1..MAXPLAYERS] of integer;
Number: array[1..MAXPLAYERS] of byte;
IP: array[1..MAXPLAYERS, 1..4] of byte;
X: array[1..MAXPLAYERS] of single;
Y: array[1..MAXPLAYERS] of single;
RedFlagX: single;
RedFlagY: single;
BlueFlagX: single;
BlueFlagY: single;
TeamScore: array[1..MAXTEAMS] of word;
MapName: string[MAPNAME_CHARS];
TimeLimit, CurrentTime: integer;
KillLimit: word;
GameStyle: byte;
MaxPlayers: byte;
MaxSpectators: byte;
Passworded: byte;
NextMap: string[MAPNAME_CHARS];
end;
TMsg_Refreshx_265 = packed record
Name: array[1..MAXPLAYERS] of string[PLAYERNAME_CHARS];
Team: array[1..MAXPLAYERS] of byte;
Kills: array[1..MAXPLAYERS] of word;
Caps: array[1..MAXPLAYERS] of byte; // new in version 2
Deaths: array[1..MAXPLAYERS] of word;
Ping: array[1..MAXPLAYERS] of integer;
Number: array[1..MAXPLAYERS] of byte;
IP: array[1..MAXPLAYERS, 1..4] of byte;
X: array[1..MAXPLAYERS] of single;
Y: array[1..MAXPLAYERS] of single;
RedFlagX: single;
RedFlagY: single;
BlueFlagX: single;
BlueFlagY: single;
TeamScore: array[1..MAXTEAMS] of word;
MapName: string[MAPNAME_CHARS];
TimeLimit, CurrentTime: integer;
KillLimit: word;
GameStyle: byte;
MaxPlayers: byte;
MaxSpectators: byte;
Passworded: byte;
NextMap: string[MAPNAME_CHARS];
end;
TMsg_Refreshx_270 = packed record
Name: array[1..MAXPLAYERS] of string[PLAYERNAME_CHARS];
HWID: array[1..MAXPLAYERS] of string[HWID_CHARS]; // new in version 3
Team: array[1..MAXPLAYERS] of byte;
Kills: array[1..MAXPLAYERS] of word;
Caps: array[1..MAXPLAYERS] of byte; // new in version 2
Deaths: array[1..MAXPLAYERS] of word;
Ping: array[1..MAXPLAYERS] of integer;
Number: array[1..MAXPLAYERS] of byte;
IP: array[1..MAXPLAYERS, 1..4] of byte;
X: array[1..MAXPLAYERS] of single;
Y: array[1..MAXPLAYERS] of single;
RedFlagX: single;
RedFlagY: single;
BlueFlagX: single;
BlueFlagY: single;
TeamScore: array[1..MAXTEAMS] of word;
MapName: string[MAPNAME_CHARS];
TimeLimit, CurrentTime: integer;
KillLimit: word;
GameStyle: byte;
MaxPlayers: byte;
MaxSpectators: byte;
Passworded: byte;
NextMap: string[MAPNAME_CHARS];
end;
implementation
end.