Skip to content

Commit 1902f6c

Browse files
author
L'In20Cible
committed
Revert "Revert "Removed networkvar.h patches.""
This reverts commit ab5617f.
1 parent ab5617f commit 1902f6c

File tree

14 files changed

+9
-4645
lines changed

14 files changed

+9
-4645
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ EndIf()
617617
# Definitions
618618
# ------------------------------------------------------------------
619619
Add_Definitions(
620+
-DGAME_DLL=1
620621
-DSOURCE_ENGINE=${SOURCE_ENGINE}
621622
-DSOURCE_ENGINE_BRANCH=${BRANCH}
622623
-DBOOST_PYTHON_MAX_ARITY=32

src/core/patches/blade/patches.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
*/
2626

2727
#include "utilities/baseentity.h"
28-
#ifndef PATCH_NETWORK_HANDLE_BASE_DEFINITION
29-
#error "We need the CNetworkHandle definition..."
28+
#ifndef PATCH_NETWORK_HANDLE_BASE_CAST
29+
#error "Change static_cast to reinterpret_cast into CNetworkHandleBase::Get()."
3030
#endif

src/core/patches/bms/patches.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
* Development Team grants this exception to all derivative works.
2525
*/
2626

27-
#include "utilities/baseentity.h"
28-
#ifndef PATCH_NETWORK_HANDLE_BASE_DEFINITION
29-
#error "We need the CNetworkHandle definition..."
30-
#endif
31-
3227
#include "public/tier0/threadtools.h"
3328
#ifndef PATCH_UPDATE_AUTO_LOCK
3429
// TODO: Create a real fix for this!

src/core/patches/csgo/patches.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
*/
2626

2727
#include "utilities/baseentity.h"
28-
#ifndef PATCH_NETWORK_HANDLE_BASE_DEFINITION
29-
#error "We need the CNetworkHandle definition..."
28+
#ifndef PATCH_NETWORK_HANDLE_BASE_CAST
29+
#error "Change static_cast to reinterpret_cast into CNetworkHandleBase::Get()."
3030
#endif

src/core/patches/l4d2/patches.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
* Development Team grants this exception to all derivative works.
2525
*/
2626

27-
#include "utilities/baseentity.h"
28-
#ifndef PATCH_NETWORK_HANDLE_BASE_DEFINITION
29-
#error "We need the CNetworkHandle definition..."
30-
#endif
31-
3227
#include "game/shared/predictioncopy.h"
3328
#ifndef PATCH_PC_REDEFINITIONS
3429
#error "PC constants are redefined into datamap.h..."

src/core/patches/orangebox/patches.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,3 @@
2323
* all respects for all other code used. Additionally, the Source.Python
2424
* Development Team grants this exception to all derivative works.
2525
*/
26-
27-
#include "utilities/baseentity.h"
28-
#ifndef PATCH_NETWORK_HANDLE_BASE_DEFINITION
29-
#error "We need the CNetworkHandle definition..."
30-
#endif

src/patches/blade/public/networkvar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,8 @@ class CNetworkQuaternionBase : public CNetworkVarBase< Type, Changer >
580580
};
581581

582582

583-
#define PATCH_NETWORK_HANDLE_BASE_DEFINITION
584583
// Network ehandle wrapper.
585-
#if 1
584+
#if defined( CLIENT_DLL ) || defined( GAME_DLL )
586585
template< class Type, class Changer >
587586
class CNetworkHandleBase : public CNetworkVarBase< CBaseHandle, Changer >
588587
{
@@ -621,6 +620,7 @@ class CNetworkQuaternionBase : public CNetworkVarBase< Type, Changer >
621620

622621
Type* Get() const
623622
{
623+
#define PATCH_NETWORK_HANDLE_BASE_CAST
624624
return reinterpret_cast< Type* >( CNetworkHandleBase<Type,Changer>::m_Value.Get() );
625625
}
626626

0 commit comments

Comments
 (0)