Skip to content
This repository was archived by the owner on Sep 22, 2021. It is now read-only.

Commit 0880b11

Browse files
committed
Removed static, spaces are now tabs
1 parent a068b3d commit 0880b11

File tree

1 file changed

+116
-116
lines changed

1 file changed

+116
-116
lines changed

DemoInfo/DP/FastNetmessages/ServerInfo.cs

Lines changed: 116 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -3,126 +3,126 @@
33

44
namespace DemoInfo
55
{
6-
public struct ServerInfo
6+
public struct ServerInfo
77
{
8-
public static Int32 Protocol;
9-
public static Int32 ServerCount;
10-
public static bool IsDedicated;
11-
public static bool IsOfficialValveServer;
12-
public static bool IsHltv;
13-
public static bool IsReplay;
14-
public static bool IsRedirectingToProxyRelay;
15-
public static Int32 COs;
16-
public static UInt32 MapCrc;
17-
public static UInt32 ClientCrc;
18-
public static UInt32 StringTableCrc;
19-
public static Int32 MaxClients;
20-
public static Int32 MaxClasses;
21-
public static Int32 PlayerSlot;
22-
public static float TickInterval;
23-
public static string GameDir;
24-
public static string MapName;
25-
public static string MapGroupName;
26-
public static string SkyName;
27-
public static string HostName;
28-
public static UInt32 PublicIp;
29-
public static UInt64 UgcMapId;
8+
public Int32 Protocol;
9+
public Int32 ServerCount;
10+
public bool IsDedicated;
11+
public bool IsOfficialValveServer;
12+
public bool IsHltv;
13+
public bool IsReplay;
14+
public bool IsRedirectingToProxyRelay;
15+
public Int32 COs;
16+
public UInt32 MapCrc;
17+
public UInt32 ClientCrc;
18+
public UInt32 StringTableCrc;
19+
public Int32 MaxClients;
20+
public Int32 MaxClasses;
21+
public Int32 PlayerSlot;
22+
public float TickInterval;
23+
public string GameDir;
24+
public string MapName;
25+
public string MapGroupName;
26+
public string SkyName;
27+
public string HostName;
28+
public UInt32 PublicIp;
29+
public UInt64 UgcMapId;
3030

3131

32-
public void Parse(IBitStream bitstream, DemoParser parser)
33-
{
34-
while (!bitstream.ChunkFinished) {
35-
var desc = bitstream.ReadProtobufVarInt();
36-
var wireType = desc & 7;
37-
var fieldnum = desc >> 3;
38-
39-
if (wireType == 5) {
40-
if (fieldnum == 14){
41-
TickInterval = bitstream.ReadFloat();
42-
}
43-
else {
44-
var val = bitstream.ReadInt(32);
45-
switch(fieldnum) {
46-
case 8:
47-
MapCrc = val;
48-
break;
49-
case 9:
50-
ClientCrc = val;
51-
break;
52-
case 10:
53-
StringTableCrc = val;
54-
break;
55-
}
56-
}
57-
}
58-
else if (wireType == 2) {
59-
var val = bitstream.ReadProtobufString();
60-
61-
switch(fieldnum) {
62-
case 15:
63-
GameDir = val;
64-
break;
65-
case 16:
66-
MapName = val;
67-
break;
68-
case 17:
69-
MapGroupName = val;
70-
break;
71-
case 18:
72-
SkyName = val;
73-
break;
74-
case 19:
75-
HostName = val;
76-
break;
77-
}
78-
}
79-
else if (wireType == 0) {
80-
var val = bitstream.ReadProtobufVarInt();
81-
var boolval = (val == 0) ? false : true;
32+
public void Parse(IBitStream bitstream, DemoParser parser)
33+
{
34+
while (!bitstream.ChunkFinished) {
35+
var desc = bitstream.ReadProtobufVarInt();
36+
var wireType = desc & 7;
37+
var fieldnum = desc >> 3;
38+
39+
if (wireType == 5) {
40+
if (fieldnum == 14){
41+
TickInterval = bitstream.ReadFloat();
42+
}
43+
else {
44+
var val = bitstream.ReadInt(32);
45+
switch(fieldnum) {
46+
case 8:
47+
MapCrc = val;
48+
break;
49+
case 9:
50+
ClientCrc = val;
51+
break;
52+
case 10:
53+
StringTableCrc = val;
54+
break;
55+
}
56+
}
57+
}
58+
else if (wireType == 2) {
59+
var val = bitstream.ReadProtobufString();
60+
61+
switch(fieldnum) {
62+
case 15:
63+
GameDir = val;
64+
break;
65+
case 16:
66+
MapName = val;
67+
break;
68+
case 17:
69+
MapGroupName = val;
70+
break;
71+
case 18:
72+
SkyName = val;
73+
break;
74+
case 19:
75+
HostName = val;
76+
break;
77+
}
78+
}
79+
else if (wireType == 0) {
80+
var val = bitstream.ReadProtobufVarInt();
81+
var boolval = (val == 0) ? false : true;
8282

83-
switch (fieldnum) {
84-
case 1:
85-
Protocol = val;
86-
break;
87-
case 2:
88-
ServerCount = val;
89-
break;
90-
case 3:
91-
IsDedicated = boolval;
92-
break;
93-
case 4:
94-
IsOfficialValveServer = boolval;
95-
break;
96-
case 5:
97-
IsHltv = boolval;
98-
break;
99-
case 6:
100-
IsReplay = boolval;
101-
break;
102-
case 7:
103-
COs = val;
104-
break;
105-
case 11:
106-
MaxClients = val;
107-
break;
108-
case 12:
109-
MaxClasses = val;
110-
break;
111-
case 13:
112-
PlayerSlot = val;
113-
break;
114-
case 20:
115-
PublicIp = (uint)val;
116-
break;
117-
case 21:
118-
IsRedirectingToProxyRelay = boolval;
119-
break;
120-
case 22:
121-
UgcMapId = (uint)val;
122-
break;
123-
}
124-
}
125-
}
83+
switch (fieldnum) {
84+
case 1:
85+
Protocol = val;
86+
break;
87+
case 2:
88+
ServerCount = val;
89+
break;
90+
case 3:
91+
IsDedicated = boolval;
92+
break;
93+
case 4:
94+
IsOfficialValveServer = boolval;
95+
break;
96+
case 5:
97+
IsHltv = boolval;
98+
break;
99+
case 6:
100+
IsReplay = boolval;
101+
break;
102+
case 7:
103+
COs = val;
104+
break;
105+
case 11:
106+
MaxClients = val;
107+
break;
108+
case 12:
109+
MaxClasses = val;
110+
break;
111+
case 13:
112+
PlayerSlot = val;
113+
break;
114+
case 20:
115+
PublicIp = (uint)val;
116+
break;
117+
case 21:
118+
IsRedirectingToProxyRelay = boolval;
119+
break;
120+
case 22:
121+
UgcMapId = (uint)val;
122+
break;
123+
}
124+
}
125+
}
126126
}
127127
}
128128
}

0 commit comments

Comments
 (0)