Skip to content

Commit

Permalink
xrGame: fix linux linkage IPureClient and IPureServer (just dumb clas…
Browse files Browse the repository at this point in the history
…ses)

make running script executable.
  • Loading branch information
eagleivg committed Oct 3, 2018
1 parent 84bbe74 commit f26a002
Show file tree
Hide file tree
Showing 14 changed files with 1,832 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/xrGame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ list(APPEND DIRS
"ui"
"gamespy"
"../xrServerEntities"
"../xrNetServer"
"../xrNetServer/empty"
)

add_dir("${DIRS}")
Expand Down Expand Up @@ -68,6 +70,9 @@ list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./static_cast_checked_test.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Client.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Server.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Compressor.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ai/monsters/rats/ai_rat_fsm.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.cpp")
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIDebugFonts.cpp")
Expand Down Expand Up @@ -95,6 +100,9 @@ list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./game_c
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker_animation_offsets.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Client.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Server.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../xrNetServer/NET_Compressor.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIDebugFonts.h")
list(REMOVE_ITEM ${PROJECT_NAME}__INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIFrags.h")
Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/GamePersistent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ void CGamePersistent::WeathersUpdate()

bool allow_intro()
{
#if defined(WINDOWS)
#ifdef MASTER_GOLD
if (g_SASH.IsRunning())
#else // #ifdef MASTER_GOLD
Expand All @@ -475,6 +476,7 @@ bool allow_intro()
return false;
}
else
#endif
return true;
}

Expand Down
4 changes: 4 additions & 0 deletions src/xrGame/Level.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

#include "xrEngine/IGame_Level.h"
#include "xrEngine/IGame_Persistent.h"
#if defined(WINDOWS)
#include "xrNetServer/NET_Client.h"
#elif defined(LINUX)
#include "xrNetServer/empty/NET_Client.h"
#endif
#include "xrEngine/StatGraph.h"
#include "xrMessages.h"
#include "alife_space.h"
Expand Down
4 changes: 4 additions & 0 deletions src/xrGame/game_sv_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include "game_sv_base_console_vars.h"
#include "game_sv_event_queue.h"
#include "game_sv_item_respawner.h"
#if defined(WINDOWS)
#include "xrNetServer/NET_Server.h"
#elif defined(LINUX)
#include "xrNetServer/empty/NET_Server.h"
#endif

#define MAX_PLAYERS_COUNT 32

Expand Down
6 changes: 5 additions & 1 deletion src/xrGame/xrServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#define AFX_XRSERVER_H__65728A25_16FC_4A7B_8CCE_D798CA5EC64E__INCLUDED_
#pragma once

#if defined(WINDOWS)
#include "xrNetServer/NET_Server.h"
#elif defined(LINUX)
#include "xrNetServer/empty/NET_Server.h"
#endif
#include "game_sv_base.h"
#include "id_generator.h"
#include "xrEngine/mp_logging.h"
Expand Down Expand Up @@ -75,7 +79,7 @@ typedef xr_vector<CheaterToKick> cheaters_t;
namespace file_transfer
{
class server_site;
}; // namespace file_transfer
} // namespace file_transfer

class clientdata_proxy;
class server_info_uploader;
Expand Down
3 changes: 2 additions & 1 deletion src/xrNetServer/NET_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MultipacketSender::~MultipacketSender()
void MultipacketSender::SendPacket(const void* packet_data, u32 packet_sz, u32 flags, u32 timeout)
{
_buf_cs->Enter();

#if defined(WINDOWS)
//PrintParsedPacket("-- LL Sending:", 1, packet_data, packet_sz);

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

buf->last_flags = flags;
#endif
_buf_cs->Leave();
}

Expand Down
4 changes: 4 additions & 0 deletions src/xrNetServer/NET_Shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ enum
IC u32 TimeGlobal(CTimer* timer) { return timer->GetElapsed_ms(); }
IC u32 TimerAsync(CTimer* timer) { return TimeGlobal(timer); }

#if defined(WINDOWS)
// DPlay
extern "C"
{
typedef struct _DPN_CONNECTION_INFO DPN_CONNECTION_INFO;
}
#endif

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

#if defined(WINDOWS)
void Update(DPN_CONNECTION_INFO& CI);
#endif

u32 getPing() const;
u32 getBPS() const;
Expand Down
Loading

0 comments on commit f26a002

Please sign in to comment.