Skip to content

Commit 6027cb1

Browse files
author
nitrocaster
committed
Delete no_single.h and NO_SINGLE macro.
1 parent 77ba564 commit 6027cb1

File tree

9 files changed

+15
-72
lines changed

9 files changed

+15
-72
lines changed

src/xrEngine/no_single.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/xrEngine/x_ray.cpp

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "stdafx.h"
99
#include "IGame_Level.h"
1010
#include "IGame_Persistent.h"
11-
#include "no_single.h"
1211
#include "xrNetServer/NET_AuthCheck.h"
1312

1413
#include "xr_input.h"
@@ -1027,36 +1026,19 @@ void CApplication::OnEvent(EVENT E, u64 P1, u64 P2)
10271026
Level_Current = u32(-1);
10281027
R_ASSERT(0 == g_pGameLevel);
10291028
R_ASSERT(0 != g_pGamePersistent);
1030-
1031-
#ifdef NO_SINGLE
1032-
Console->Execute("main_menu on");
1033-
if ((op_server == NULL) ||
1034-
(!xr_strlen(op_server)) ||
1035-
(
1036-
(strstr(op_server, "/dm") || strstr(op_server, "/deathmatch") ||
1037-
strstr(op_server, "/tdm") || strstr(op_server, "/teamdeathmatch") ||
1038-
strstr(op_server, "/ah") || strstr(op_server, "/artefacthunt") ||
1039-
strstr(op_server, "/cta") || strstr(op_server, "/capturetheartefact")
1040-
) &&
1041-
!strstr(op_server, "/alife")
1042-
)
1043-
)
1044-
#endif // #ifdef NO_SINGLE
1045-
{
1046-
Console->Execute("main_menu off");
1047-
Console->Hide();
1048-
//! this line is commented by Dima
1049-
//! because I don't see any reason to reset device here
1050-
//! Device.Reset (false);
1051-
//-----------------------------------------------------------
1052-
g_pGamePersistent->PreStart(op_server);
1053-
//-----------------------------------------------------------
1054-
g_pGameLevel = (IGame_Level*)NEW_INSTANCE(CLSID_GAME_LEVEL);
1055-
pApp->LoadBegin();
1056-
g_pGamePersistent->Start(op_server);
1057-
g_pGameLevel->net_Start(op_server, op_client);
1058-
pApp->LoadEnd();
1059-
}
1029+
Console->Execute("main_menu off");
1030+
Console->Hide();
1031+
//! this line is commented by Dima
1032+
//! because I don't see any reason to reset device here
1033+
//! Device.Reset (false);
1034+
//-----------------------------------------------------------
1035+
g_pGamePersistent->PreStart(op_server);
1036+
//-----------------------------------------------------------
1037+
g_pGameLevel = (IGame_Level*)NEW_INSTANCE(CLSID_GAME_LEVEL);
1038+
pApp->LoadBegin();
1039+
g_pGamePersistent->Start(op_server);
1040+
g_pGameLevel->net_Start(op_server, op_client);
1041+
pApp->LoadEnd();
10601042
xr_free(op_server);
10611043
xr_free(op_client);
10621044
}

src/xrEngine/xrEngine.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@
506506
<ClInclude Include="line_editor.h" />
507507
<ClInclude Include="line_edit_control.h" />
508508
<ClInclude Include="mp_logging.h" />
509-
<ClInclude Include="no_single.h" />
510509
<ClInclude Include="ObjectAnimator.h" />
511510
<ClInclude Include="ObjectDump.h" />
512511
<ClInclude Include="PerformanceAlert.hpp" />

src/xrEngine/xrEngine.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@
243243
<ClInclude Include="mp_logging.h">
244244
<Filter>General</Filter>
245245
</ClInclude>
246-
<ClInclude Include="no_single.h">
247-
<Filter>General</Filter>
248-
</ClInclude>
249246
<ClInclude Include="stdafx.h">
250247
<Filter>General</Filter>
251248
</ClInclude>

src/xrGame/UIDialogHolder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#pragma once
2-
#include "xrEngine/no_single.h"
32

43
class CUIDialogWnd;
54
class CUIWindow;

src/xrGame/ai_space.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "alife_simulator.h"
2323
#include "moving_objects.h"
2424
#include "doors_manager.h"
25-
#include "xrEngine/no_single.h"
2625

2726
ENGINE_API bool g_dedicated_server;
2827

@@ -45,8 +44,6 @@ void CAI_Space::init ()
4544
{
4645
if (g_dedicated_server)
4746
return;
48-
49-
#ifndef NO_SINGLE
5047
VERIFY (!m_ef_storage);
5148
m_ef_storage = xr_new<CEF_Storage>();
5249

@@ -61,8 +58,6 @@ void CAI_Space::init ()
6158

6259
VERIFY (!m_moving_objects);
6360
m_moving_objects = xr_new<::moving_objects>();
64-
65-
#endif //#ifndef NO_SINGLE
6661
RegisterScriptClasses();
6762
object_factory().register_script();
6863
LoadCommonScripts();

src/xrGame/game_sv_single.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "gamepersistent.h"
1010
#include "xrServer.h"
1111
#include "xrEngine/x_ray.h"
12-
#include "xrEngine/no_single.h"
1312

1413
game_sv_Single::game_sv_Single ()
1514
{
@@ -25,12 +24,8 @@ game_sv_Single::~game_sv_Single ()
2524
void game_sv_Single::Create (shared_str& options)
2625
{
2726
inherited::Create (options);
28-
29-
#ifndef NO_SINGLE
3027
if (strstr(*options,"/alife"))
3128
m_alife_simulator = xr_new<CALifeSimulator>(&server(),&options);
32-
#endif //#ifndef NO_SINGLE
33-
3429
switch_Phase (GAME_PHASE_INPROGRESS);
3530
}
3631

src/xrGame/gamespy/GameSpy_Patching.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "GameSpy_Base_Defs.h"
44
#include "MainMenu.h"
55
#include "xrGameSpy/xrGameSpy_MainDefs.h"
6-
#include "xrEngine/no_single.h"
76

87
CGameSpy_Patching::CGameSpy_Patching()
98
{

src/xrServerEntities/object_factory_register.cpp

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -196,20 +196,15 @@ void CObjectFactory::register_classes ()
196196
add<CGamePersistent> (CLSID_GAME_PERSISTANT ,"game");
197197
add<CHUDManager> (CLSID_HUDMANAGER ,"hud_manager");
198198
//Server Game type
199-
200-
#ifndef NO_SINGLE
201199
add<game_sv_Single> (CLSID_SV_GAME_SINGLE ,"game_sv_single");
202-
#endif // #ifndef NO_SINGLE
203200
#ifndef BENCHMARK_BUILD
204201
add<game_sv_Deathmatch> (CLSID_SV_GAME_DEATHMATCH ,"game_sv_deathmatch");
205202
add<game_sv_TeamDeathmatch> (CLSID_SV_GAME_TEAMDEATHMATCH ,"game_sv_team_deathmatch");
206203
add<game_sv_ArtefactHunt> (CLSID_SV_GAME_ARTEFACTHUNT ,"game_sv_artefact_hunt");
207204
add<game_sv_CaptureTheArtefact> (CLSID_SV_GAME_CAPTURETHEARTEFACT ,"game_sv_capture_the_artefact");
208205
#endif // BENCHMARK_BUILD
209206
//Client Game type
210-
#ifndef NO_SINGLE
211207
add<game_cl_Single> (CLSID_CL_GAME_SINGLE ,"game_cl_single");
212-
#endif // #ifndef NO_SINGLE
213208
#ifndef BENCHMARK_BUILD
214209
add<game_cl_Deathmatch> (CLSID_CL_GAME_DEATHMATCH ,"game_cl_deathmatch");
215210
add<game_cl_TeamDeathmatch> (CLSID_CL_GAME_TEAMDEATHMATCH ,"game_cl_team_deathmatch");
@@ -223,28 +218,18 @@ void CObjectFactory::register_classes ()
223218
add<CUIGameTDM> (CLSID_GAME_UI_TEAMDEATHMATCH ,"game_ui_team_deathmatch");
224219
add<CUIGameAHunt> (CLSID_GAME_UI_ARTEFACTHUNT ,"game_ui_artefact_hunt");
225220
add<CUIGameCTA> (CLSID_GAME_UI_CAPTURETHEARTEFACT ,"game_ui_capture_the_artefact");
226-
227-
# ifndef NO_SINGLE
228-
ADD_MP(CActor,CActorMP,CSE_ALifeCreatureActor,CSE_ActorMP ,CLSID_OBJECT_ACTOR ,"actor");
229-
# else // #ifndef NO_SINGLE
230-
ADD(CActorMP,CSE_ActorMP ,CLSID_OBJECT_ACTOR ,"actor");
231-
# endif // #ifndef NO_SINGLE
221+
ADD_MP(CActor,CActorMP,CSE_ALifeCreatureActor,CSE_ActorMP ,CLSID_OBJECT_ACTOR ,"actor");
232222
#else // NO_XR_GAME
233223
ADD(CActor ,CSE_ALifeCreatureActor ,CLSID_OBJECT_ACTOR ,"actor");
234224
#endif // NO_XR_GAME
235225

236226
// server entities
237-
#ifndef NO_SINGLE
238227
add<CSE_ALifeGroupTemplate<CSE_ALifeMonsterBase> > (CLSID_AI_FLESH_GROUP ,"flesh_group");
239228
// add<CSE_SpawnGroup> (CLSID_AI_SPAWN_GROUP ,"spawn_group");
240229
add<CSE_ALifeGraphPoint> (CLSID_AI_GRAPH ,"graph_point");
241-
add<CSE_ALifeOnlineOfflineGroup> (CLSID_ONLINE_OFFLINE_GROUP ,"online_offline_group");
242-
#endif // #ifndef NO_SINGLE
243-
230+
add<CSE_ALifeOnlineOfflineGroup> (CLSID_ONLINE_OFFLINE_GROUP ,"online_offline_group");
244231
// client and server entities
245232
ADD(CSpectator ,CSE_Spectator ,CLSID_SPECTATOR ,"spectator");
246-
247-
#ifndef NO_SINGLE
248233
ADD(CAI_Flesh ,CSE_ALifeMonsterBase ,CLSID_AI_FLESH ,"flesh");
249234
ADD(CChimera ,CSE_ALifeMonsterBase ,CLSID_AI_CHIMERA ,"chimera");
250235
ADD(CAI_Dog ,CSE_ALifeMonsterBase ,CLSID_AI_DOG_RED ,"dog_red");
@@ -274,8 +259,6 @@ void CObjectFactory::register_classes ()
274259
ADD(CCar ,CSE_ALifeCar ,CLSID_CAR ,"car");
275260

276261
ADD(CHelicopter ,CSE_ALifeHelicopter ,CLSID_VEHICLE_HELICOPTER ,"helicopter");
277-
#endif // #ifndef NO_SINGLE
278-
279262
// Artefacts
280263
ADD(CMercuryBall ,CSE_ALifeItemArtefact ,CLSID_AF_MERCURY_BALL ,"art_mercury_ball");
281264
ADD(CBlackDrops ,CSE_ALifeItemArtefact ,CLSID_AF_BLACKDROPS ,"art_black_drops");
@@ -331,9 +314,7 @@ void CObjectFactory::register_classes ()
331314
ADD(CGrenadeLauncher ,CSE_ALifeItem ,CLSID_OBJECT_W_GLAUNCHER ,"wpn_grenade_launcher");
332315

333316
// Inventory
334-
#ifndef NO_SINGLE
335317
ADD(CBolt ,CSE_ALifeItemBolt ,CLSID_IITEM_BOLT ,"obj_bolt");
336-
#endif // #ifndef NO_SINGLE
337318
ADD(CMedkit ,CSE_ALifeItem ,CLSID_IITEM_MEDKIT ,"obj_medkit");
338319
ADD(CMedkit ,CSE_ALifeItem ,CLSID_IITEM_BANDAGE ,"obj_bandage");
339320
ADD(CAntirad ,CSE_ALifeItem ,CLSID_IITEM_ANTIRAD ,"obj_antirad");
@@ -411,9 +392,7 @@ void CObjectFactory::register_classes ()
411392
ADD(CDestroyablePhysicsObject,CSE_ALifeObjectPhysic ,CLSID_PHYSICS_DESTROYABLE ,"obj_phys_destroyable");
412393

413394
ADD(CInventoryBox ,CSE_ALifeInventoryBox ,CLSID_INVENTORY_BOX ,"inventory_box");
414-
#ifndef NO_SINGLE
415395
ADD(smart_cover::object ,CSE_SmartCover ,TEXT2CLSID("SMRTCOVR") ,"smart_cover");
416-
#endif // #ifndef NO_SINGLE
417396

418397
#ifndef NO_XR_GAME
419398
// hack, for dedicated server only

0 commit comments

Comments
 (0)