Skip to content

Commit f26a002

Browse files
committed
xrGame: fix linux linkage IPureClient and IPureServer (just dumb classes)
make running script executable.
1 parent 84bbe74 commit f26a002

File tree

14 files changed

+1832
-4
lines changed

14 files changed

+1832
-4
lines changed

src/xrGame/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ list(APPEND DIRS
3232
"ui"
3333
"gamespy"
3434
"../xrServerEntities"
35+
"../xrNetServer"
36+
"../xrNetServer/empty"
3537
)
3638

3739
add_dir("${DIRS}")
@@ -68,6 +70,9 @@ list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker
6870
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./static_cast_checked_test.cpp")
6971
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.cpp")
7072
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.cpp")
73+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Client.cpp")
74+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Server.cpp")
75+
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Compressor.cpp")
7176
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ai/monsters/rats/ai_rat_fsm.cpp")
7277
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.cpp")
7378
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIDebugFonts.cpp")
@@ -95,6 +100,9 @@ list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./game_c
95100
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker_animation_offsets.h")
96101
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.h")
97102
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.h")
103+
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Client.h")
104+
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Server.h")
105+
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Compressor.h")
98106
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.h")
99107
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIDebugFonts.h")
100108
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIFrags.h")

src/xrGame/GamePersistent.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ void CGamePersistent::WeathersUpdate()
466466

467467
bool allow_intro()
468468
{
469+
#if defined(WINDOWS)
469470
#ifdef MASTER_GOLD
470471
if (g_SASH.IsRunning())
471472
#else // #ifdef MASTER_GOLD
@@ -475,6 +476,7 @@ bool allow_intro()
475476
return false;
476477
}
477478
else
479+
#endif
478480
return true;
479481
}
480482

src/xrGame/Level.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
#include "xrEngine/IGame_Level.h"
44
#include "xrEngine/IGame_Persistent.h"
5+
#if defined(WINDOWS)
56
#include "xrNetServer/NET_Client.h"
7+
#elif defined(LINUX)
8+
#include "xrNetServer/empty/NET_Client.h"
9+
#endif
610
#include "xrEngine/StatGraph.h"
711
#include "xrMessages.h"
812
#include "alife_space.h"

src/xrGame/game_sv_base.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
#include "game_sv_base_console_vars.h"
88
#include "game_sv_event_queue.h"
99
#include "game_sv_item_respawner.h"
10+
#if defined(WINDOWS)
1011
#include "xrNetServer/NET_Server.h"
12+
#elif defined(LINUX)
13+
#include "xrNetServer/empty/NET_Server.h"
14+
#endif
1115

1216
#define MAX_PLAYERS_COUNT 32
1317

src/xrGame/xrServer.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
#define AFX_XRSERVER_H__65728A25_16FC_4A7B_8CCE_D798CA5EC64E__INCLUDED_
88
#pragma once
99

10+
#if defined(WINDOWS)
1011
#include "xrNetServer/NET_Server.h"
12+
#elif defined(LINUX)
13+
#include "xrNetServer/empty/NET_Server.h"
14+
#endif
1115
#include "game_sv_base.h"
1216
#include "id_generator.h"
1317
#include "xrEngine/mp_logging.h"
@@ -75,7 +79,7 @@ typedef xr_vector<CheaterToKick> cheaters_t;
7579
namespace file_transfer
7680
{
7781
class server_site;
78-
}; // namespace file_transfer
82+
} // namespace file_transfer
7983

8084
class clientdata_proxy;
8185
class server_info_uploader;

src/xrNetServer/NET_Common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ MultipacketSender::~MultipacketSender()
7474
void MultipacketSender::SendPacket(const void* packet_data, u32 packet_sz, u32 flags, u32 timeout)
7575
{
7676
_buf_cs->Enter();
77-
77+
#if defined(WINDOWS)
7878
//PrintParsedPacket("-- LL Sending:", 1, packet_data, packet_sz);
7979

8080
Buffer* buf = &_buf;
@@ -111,6 +111,7 @@ void MultipacketSender::SendPacket(const void* packet_data, u32 packet_sz, u32 f
111111
_FlushSendBuffer(timeout, buf);
112112

113113
buf->last_flags = flags;
114+
#endif
114115
_buf_cs->Leave();
115116
}
116117

src/xrNetServer/NET_Shared.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ enum
3636
IC u32 TimeGlobal(CTimer* timer) { return timer->GetElapsed_ms(); }
3737
IC u32 TimerAsync(CTimer* timer) { return TimeGlobal(timer); }
3838

39+
#if defined(WINDOWS)
3940
// DPlay
4041
extern "C"
4142
{
4243
typedef struct _DPN_CONNECTION_INFO DPN_CONNECTION_INFO;
4344
}
45+
#endif
4446

4547
class XRNETSERVER_API IClientStatistic
4648
{
@@ -52,7 +54,9 @@ class XRNETSERVER_API IClientStatistic
5254
IClientStatistic(const IClientStatistic& rhs); // Required due to probable bug in CLevel::ProcessCompressedUpdate
5355
~IClientStatistic();
5456

57+
#if defined(WINDOWS)
5558
void Update(DPN_CONNECTION_INFO& CI);
59+
#endif
5660

5761
u32 getPing() const;
5862
u32 getBPS() const;

0 commit comments

Comments
 (0)