Skip to content

Commit

Permalink
Выкинул Xr_NET_Server и DirectPlay
Browse files Browse the repository at this point in the history
Оставшиеся его ошмётки перенёс в xr_3da ( closed #35 )
  • Loading branch information
xrSimpodin committed Oct 4, 2018
1 parent d3d0e43 commit 715e7ee
Show file tree
Hide file tree
Showing 81 changed files with 607 additions and 5,246 deletions.
392 changes: 0 additions & 392 deletions 3rd_party/Src/d3dx/include/dpaddr.h

This file was deleted.

1,456 changes: 0 additions & 1,456 deletions 3rd_party/Src/d3dx/include/dplay8.h

This file was deleted.

10 changes: 0 additions & 10 deletions Engine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrSound", "ogsr_engine\xrSo
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrParticles", "ogsr_engine\xrParticles\xrParticles.vcxproj", "{94A1C366-3D19-48E6-8170-4ADC2E70DF97}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrNetServer", "ogsr_engine\xrNetServer\xrNetServer.vcxproj", "{435BAC9A-B225-457D-AB40-C9BD0CC8838C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XR_3DA", "ogsr_engine\xr_3da\XR_3DA.vcxproj", "{2578C6D8-660D-48AE-9322-7422F8664F06}"
ProjectSection(ProjectDependencies) = postProject
{D6AEA327-48BC-45C8-B0E9-BF775E451904} = {D6AEA327-48BC-45C8-B0E9-BF775E451904}
Expand Down Expand Up @@ -176,14 +174,6 @@ Global
{94A1C366-3D19-48E6-8170-4ADC2E70DF97}.Release|x64.Build.0 = Release|x64
{94A1C366-3D19-48E6-8170-4ADC2E70DF97}.Release|x86.ActiveCfg = Release|Win32
{94A1C366-3D19-48E6-8170-4ADC2E70DF97}.Release|x86.Build.0 = Release|Win32
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Debug|x64.ActiveCfg = Debug|x64
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Debug|x64.Build.0 = Debug|x64
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Debug|x86.ActiveCfg = Debug|Win32
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Debug|x86.Build.0 = Debug|Win32
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Release|x64.ActiveCfg = Release|x64
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Release|x64.Build.0 = Release|x64
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Release|x86.ActiveCfg = Release|Win32
{435BAC9A-B225-457D-AB40-C9BD0CC8838C}.Release|x86.Build.0 = Release|Win32
{2578C6D8-660D-48AE-9322-7422F8664F06}.Debug|x64.ActiveCfg = Debug|x64
{2578C6D8-660D-48AE-9322-7422F8664F06}.Debug|x64.Build.0 = Debug|x64
{2578C6D8-660D-48AE-9322-7422F8664F06}.Debug|x86.ActiveCfg = Debug|Win32
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/PHNetState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


#include "PHNetState.h"
#include "../xrNetServer/NET_utils.h"
#include "../xr_3da/NET_Server_Trash/NET_utils.h"

//////////////////////////////////////8/////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/object_broker.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include "..\xrNetServer\net_utils.h"
#include "../xr_3da/NET_Server_Trash\net_utils.h"
#include <queue>
#include "object_interfaces.h"
#include "object_type_traits.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/script_net_packet_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "stdafx.h"
#include "script_net_packet.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"

using namespace luabind;

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/server_entity_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "server_entity_wrapper.h"
#include "xrServer_Objects.h"
#include "xrmessages.h"
#include "net_utils.h"
#include "../../xr_3da/NET_Server_Trash/net_utils.h"

#ifdef AI_COMPILER
# include "factory_api.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Object_Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "object_interfaces.h"
#include "script_value_container.h"
#include "alife_space.h"
#include "../xrNetServer/client_id.h"
#include "../xr_3da/NET_Server_Trash/client_id.h"

class NET_Packet;
class xrClientData;
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "xrServer_Objects.h"
#include "game_base_space.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Objects_ALife.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "xrServer_Objects_ALife.h"
#include "xrServer_Objects_ALife_Monsters.h"
#include "game_base_space.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Objects_ALife_Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "stdafx.h"
#include "xrMessages.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "clsid_game.h"
#include "xrServer_Objects_ALife_Items.h"
#include "clsid_game.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Objects_ALife_Monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "xrServer_Objects_ALife_Items.h"
#include "xrServer_Objects_ALife_Monsters.h"
#include "object_broker.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_Objects_Abstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#pragma pack(push,4)

#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "xrServer_Objects_Abstract.h"
#include "xrMessages.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/COMMON_AI/xrServer_script_macroses.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "script_export_macroses.h"
#include "..\editors\xrEProps\xrEProps.h"
#include "..\xrNetServer\NET_utils.h"
#include "../xr_3da/NET_Server_Trash\NET_utils.h"
#include "ai_space.h"
#include "script_engine.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/BlackGraviArtifact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "xrmessages.h"
#include "physicsshellholder.h"
#include "explosive.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "PHWorld.h"
#include "CharacterPhysicsSupport.h"
extern CPHWorld* ph_world;
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/BottleItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "stdafx.h"
#include "BottleItem.h"
#include "xrmessages.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "entity_alive.h"
#include "EntityCondition.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/BreakableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "PhysicsShell.h"
#include "Physics.h"
#include "../xr_3da/xr_collide_form.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "clsid_game.h"
#include "../xr_3da/skeletoncustom.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/CarDoors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "hit.h"
#include "PHDestroyable.h"
#include "car.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "../xr_3da/skeletoncustom.h"
#include "MathUtils.h"
#include "game_object_space.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "ai_debug.h"
#include "..\xr_3da\igame_level.h"
#include "level.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "script_callback_ex.h"
#include "MathUtils.h"
#include "game_cl_base_weapon_usage_statistic.h"
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/GameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class CGameObject :

// Utilities
static void u_EventGen (NET_Packet& P, u32 type, u32 dest );
static void u_EventSend (NET_Packet& P, u32 dwFlags = DPNSEND_GUARANTEED );
static void u_EventSend (NET_Packet& P, u32 dwFlags = 0x0008);

// Methods
virtual void Load (LPCSTR section);
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/HelicopterWeapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "helicopter.h"
#include "ExplosiveRocket.h"
#include "xrMessages.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "../xr_3da/skeletoncustom.h"
#include "Level.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/Hit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "hit.h"
#include "ode_include.h"
#include "bone.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"
#include "xrMessages.h"
#include "Level.h"

Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/InfoDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "PDA.h"
#include "inventoryowner.h"
#include "xrserver_objects_alife_items.h"
#include "../xrNetServer/net_utils.h"
#include "../xr_3da/NET_Server_Trash/net_utils.h"

CInfoDocument::CInfoDocument(void)
{
Expand Down
70 changes: 0 additions & 70 deletions ogsr_engine/xrGame/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,11 @@ void CLevel::OnFrame ()
BulletManager().CommitEvents ();
Device.Statistic->TEST0.End ();

// Client receive
if (net_isDisconnected())
{
Engine.Event.Defer ("kernel:disconnect");
return;
} else {

Device.Statistic->netClient1.Begin();

ClientReceive ();

Device.Statistic->netClient1.End ();
}

ProcessGameEvents ();

Expand All @@ -427,68 +419,6 @@ void CLevel::OnFrame ()
MapManager().Update ();
// Inherited update
inherited::OnFrame ();

// Draw client/server stats
if (psDeviceFlags.test(rsStatistic))
{
CGameFont* F = HUD().Font().pFontDI;
if (!psNET_direct_connect)
{
if ( IsServer() )
{
const IServerStatistic* S = Server->GetStatistic();
F->SetHeightI (0.015f);
F->OutSetI (0.0f,0.5f);
F->SetColor (D3DCOLOR_XRGB(0,255,0));
F->OutNext ("IN: %4d/%4d (%2.1f%%)", S->bytes_in_real, S->bytes_in, 100.f*float(S->bytes_in_real)/float(S->bytes_in));
F->OutNext ("OUT: %4d/%4d (%2.1f%%)", S->bytes_out_real, S->bytes_out, 100.f*float(S->bytes_out_real)/float(S->bytes_out));
F->OutNext ("client_2_sever ping: %d", net_Statistic.getPing());
F->OutNext ("SPS/Sended : %4d/%4d", S->dwBytesPerSec, S->dwBytesSended);
F->OutNext ("sv_urate/cl_urate : %4d/%4d", psNET_ServerUpdate, psNET_ClientUpdate);

F->SetColor (D3DCOLOR_XRGB(255,255,255));
for (u32 I=0; I<Server->client_Count(); ++I)
{
IClient* C = Server->client_Get(I);
Server->UpdateClientStatistic(C);
F->OutNext("P(%d), BPS(%2.1fK), MRR(%2d), MSR(%2d), Retried(%2d), Blocked(%2d)",
//Server->game->get_option_s(*C->Name,"name",*C->Name),
// C->Name,
C->stats.getPing(),
float(C->stats.getBPS()),// /1024,
C->stats.getMPS_Receive (),
C->stats.getMPS_Send (),
C->stats.getRetriedCount(),
C->stats.dwTimesBlocked
);
}
}
if (IsClient())
{
IPureClient::UpdateStatistic();

F->SetHeightI(0.015f);
F->OutSetI (0.0f,0.5f);
F->SetColor (D3DCOLOR_XRGB(0,255,0));
F->OutNext ("client_2_sever ping: %d", net_Statistic.getPing());
F->OutNext ("sv_urate/cl_urate : %4d/%4d", psNET_ServerUpdate, psNET_ClientUpdate);

F->SetColor (D3DCOLOR_XRGB(255,255,255));
F->OutNext("P(%d), BPS(%2.1fK), MRR(%2d), MSR(%2d), Retried(%2d), Blocked(%2d), Sended(%2d), SPS(%2d)",
//Server->game->get_option_s(C->Name,"name",C->Name),
// C->Name,
net_Statistic.getPing(),
float(net_Statistic.getBPS()),// /1024,
net_Statistic.getMPS_Receive (),
net_Statistic.getMPS_Send (),
net_Statistic.getRetriedCount(),
net_Statistic.dwTimesBlocked,
net_Statistic.dwBytesSended,
net_Statistic.dwBytesPerSec
);
}
}
}

// g_pGamePersistent->Environment().SetGameTime (GetGameDayTimeSec(),GetGameTimeFactor());
g_pGamePersistent->Environment().SetGameTime (GetEnvironmentGameDayTimeSec(),GetGameTimeFactor());
Expand Down
2 changes: 1 addition & 1 deletion ogsr_engine/xrGame/Level.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#pragma once

#include "..\xr_3da\igame_level.h"
#include "../xrNetServer/net_client.h"
#include "../xr_3da/NET_Server_Trash/net_client.h"
#include "script_export_space.h"
#include "..\xr_3da\StatGraph.h"
#include "xrMessages.h"
Expand Down
30 changes: 6 additions & 24 deletions ogsr_engine/xrGame/Level_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ void CLevel::remove_objects ()

snd_Events.clear ();
for (int i=0; i<6; ++i) {
psNET_Flags.set (NETFLAG_MINIMIZEUPDATES,FALSE);
// ugly hack for checks that update is twice on frame
// we need it since we do updates for checking network messages
++(Device.dwFrame);
Expand Down Expand Up @@ -156,7 +155,7 @@ void CLevel::ClientSend()
};
if (OnClient())
{
Flush_Send_Buffer();
FATAL(""); //Ýòî íå äîëæíî áûòü âûçâàíî
return;
}
//-------------------------------------------------
Expand Down Expand Up @@ -228,16 +227,9 @@ void CLevel::Send (NET_Packet& P, u32 dwFlags, u32 dwTimeout)
{
if (IsDemoPlay() && m_bDemoStarted) return;
// optimize the case when server located in our memory
if(psNET_direct_connect){
ClientID _clid;
_clid.set (1);
Server->OnMessage (P, _clid );
}else
if (Server && game_configured && OnServer() )
{
Server->OnMessage (P,Game().local_svdpnid );
}else
IPureClient::Send (P,dwFlags,dwTimeout );
ClientID _clid;
_clid.set (1);
Server->OnMessage (P, _clid );
}

void CLevel::net_Update ()
Expand Down Expand Up @@ -275,7 +267,7 @@ BOOL CLevel::Connect2Server (LPCSTR options)
m_bConnectResult = true ;
if (!Connect(options)) return FALSE;
//---------------------------------------------------------------------------
if(psNET_direct_connect) m_bConnectResultReceived = true;
m_bConnectResultReceived = true;
u32 EndTime = GetTickCount() + ConnectionTimeOut;
while (!m_bConnectResultReceived) {
ClientReceive ();
Expand Down Expand Up @@ -312,14 +304,7 @@ BOOL CLevel::Connect2Server (LPCSTR options)
return FALSE ;
};


if(psNET_direct_connect)
net_Syncronised = TRUE;
else
net_Syncronize ();

while (!net_IsSyncronised()) {
};
net_Syncronised = TRUE;

//---------------------------------------------------------------------------
P.w_begin (M_CLIENT_REQUEST_CONNECTION_DATA);
Expand Down Expand Up @@ -435,17 +420,14 @@ void CLevel::ClearAllObjects ()

void CLevel::OnInvalidHost ()
{
IPureClient::OnInvalidHost();
};

void CLevel::OnInvalidPassword ()
{
IPureClient::OnInvalidPassword();
};

void CLevel::OnSessionFull ()
{
IPureClient::OnSessionFull();
}

void CLevel::OnConnectRejected ()
Expand Down
Loading

0 comments on commit 715e7ee

Please sign in to comment.