Skip to content

Commit 32e8f37

Browse files
committed
Reformat: xrNetServer
1 parent cad7b7c commit 32e8f37

19 files changed

+3135
-3398
lines changed

src/xrNetServer/NET_AuthCheck.cpp

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,55 @@
1-
#include "stdafx.h"
21
#include "NET_AuthCheck.h"
2+
#include "stdafx.h"
33

4-
void XRNETSERVER_API fill_auth_check_params(xr_auth_strings_t & ignore,
5-
xr_auth_strings_t & check)
4+
void XRNETSERVER_API fill_auth_check_params(xr_auth_strings_t& ignore, xr_auth_strings_t& check)
65
{
7-
string_path config;
8-
LPCSTR pth = FS.get_path("$app_data_root$")->m_Path;
9-
ignore.push_back (shared_str(pth));
10-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "localization.ltx")));
11-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "fonts.ltx")));
12-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "items.ltx")));
13-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "text")));
14-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "gameplay")));
15-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "ui")));
16-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "scripts")));
17-
ignore.push_back (shared_str(FS.update_path(config, "$game_config$", "misc\\script_sound_pripyat.ltx")));
18-
ignore.push_back (shared_str(FS.update_path(config, "$game_scripts$", "state_mgr_pri_a15.script")));
6+
string_path config;
7+
LPCSTR pth = FS.get_path("$app_data_root$")->m_Path;
8+
ignore.push_back(shared_str(pth));
9+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "localization.ltx")));
10+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "fonts.ltx")));
11+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "items.ltx")));
12+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "text")));
13+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "gameplay")));
14+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "ui")));
15+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "scripts")));
16+
ignore.push_back(shared_str(FS.update_path(config, "$game_config$", "misc\\script_sound_pripyat.ltx")));
17+
ignore.push_back(shared_str(FS.update_path(config, "$game_scripts$", "state_mgr_pri_a15.script")));
1918

20-
check.push_back (shared_str(FS.update_path(config, "$game_config$", "")));
21-
check.push_back (shared_str(FS.update_path(config, "$game_scripts$", "")));
22-
check.push_back (shared_str(FS.update_path(config, "$game_shaders$", "")));
23-
//sounds
24-
check.push_back (shared_str(FS.update_path(config, "$game_sounds$", "material")));
25-
check.push_back (shared_str(FS.update_path(config, "$game_sounds$", "weapons")));
19+
check.push_back(shared_str(FS.update_path(config, "$game_config$", "")));
20+
check.push_back(shared_str(FS.update_path(config, "$game_scripts$", "")));
21+
check.push_back(shared_str(FS.update_path(config, "$game_shaders$", "")));
22+
// sounds
23+
check.push_back(shared_str(FS.update_path(config, "$game_sounds$", "material")));
24+
check.push_back(shared_str(FS.update_path(config, "$game_sounds$", "weapons")));
2625

27-
// check scopes
28-
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair.dds")));
29-
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_bino.dds")));
30-
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_g36.dds")));
31-
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_l85.dds")));
32-
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_rpg.dds")));
26+
// check scopes
27+
check.push_back(shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair.dds")));
28+
check.push_back(shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_bino.dds")));
29+
check.push_back(shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_g36.dds")));
30+
check.push_back(shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_l85.dds")));
31+
check.push_back(shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_rpg.dds")));
3332

34-
check.push_back (shared_str("xrD3D9-Null"));
35-
check.push_back (shared_str("ODE"));
36-
check.push_back (shared_str("xrCDB"));
37-
check.push_back (shared_str("xrCore"));
38-
// check.push_back (shared_str("xrGame"));
39-
check.push_back (shared_str("xrGamespy"));
40-
check.push_back (shared_str("xrNetserver"));
41-
check.push_back (shared_str("xrParticles"));
42-
check.push_back (shared_str("xrRender_R1"));
43-
check.push_back (shared_str("xrRender_R2"));
44-
check.push_back (shared_str("xrSound"));
45-
check.push_back (shared_str("xrXMLParser"));
46-
// check.push_back (shared_str("xrEngine.exe"));
33+
check.push_back(shared_str("xrD3D9-Null"));
34+
check.push_back(shared_str("ODE"));
35+
check.push_back(shared_str("xrCDB"));
36+
check.push_back(shared_str("xrCore"));
37+
// check.push_back (shared_str("xrGame"));
38+
check.push_back(shared_str("xrGamespy"));
39+
check.push_back(shared_str("xrNetserver"));
40+
check.push_back(shared_str("xrParticles"));
41+
check.push_back(shared_str("xrRender_R1"));
42+
check.push_back(shared_str("xrRender_R2"));
43+
check.push_back(shared_str("xrSound"));
44+
check.push_back(shared_str("xrXMLParser"));
45+
// check.push_back (shared_str("xrEngine.exe"));
4746
}
4847

49-
bool XRNETSERVER_API allow_to_include_path (xr_auth_strings_t const & ignore,
50-
LPCSTR path)
48+
bool XRNETSERVER_API allow_to_include_path(xr_auth_strings_t const& ignore, LPCSTR path)
5149
{
52-
for (xr_auth_strings_t::const_iterator i = ignore.begin(),
53-
ie = ignore.end(); i != ie; ++i)
54-
{
55-
if (!strncmp(i->c_str(), path, i->size()))
56-
return false;
57-
}
58-
return true;
50+
for (xr_auth_strings_t::const_iterator i = ignore.begin(), ie = ignore.end(); i != ie; ++i)
51+
{
52+
if (!strncmp(i->c_str(), path, i->size())) return false;
53+
}
54+
return true;
5955
}

src/xrNetServer/NET_AuthCheck.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
#include "net_shared.h"
55

66
typedef xr_vector<shared_str> xr_auth_strings_t;
7-
void XRNETSERVER_API fill_auth_check_params (xr_auth_strings_t & ignore,
8-
xr_auth_strings_t & check);
9-
bool XRNETSERVER_API allow_to_include_path (xr_auth_strings_t const & ignore,
10-
LPCSTR path);
7+
void XRNETSERVER_API fill_auth_check_params(xr_auth_strings_t& ignore, xr_auth_strings_t& check);
8+
bool XRNETSERVER_API allow_to_include_path(xr_auth_strings_t const& ignore, LPCSTR path);
119

12-
#endif//#ifndef NET_AUTH_CHECK_INCLUDED
10+
#endif //#ifndef NET_AUTH_CHECK_INCLUDED

0 commit comments

Comments
 (0)