diff --git a/regamedll/build.gradle b/regamedll/build.gradle index b2369016..20288589 100644 --- a/regamedll/build.gradle +++ b/regamedll/build.gradle @@ -226,6 +226,7 @@ class RegamedllSrc { exclude "tier0/platform_linux.cpp" } else { exclude "tier0/platform_win32.cpp" + exclude "classes_dummy.cpp" } //exclude "interface.cpp" diff --git a/regamedll/msvc/ReGameDLL.vcxproj b/regamedll/msvc/ReGameDLL.vcxproj index c4677948..4a286a43 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj +++ b/regamedll/msvc/ReGameDLL.vcxproj @@ -725,6 +725,7 @@ + @@ -1320,7 +1321,7 @@ $(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories) Level3 - MaxSpeed + Full true REGAMEDLL_ADD;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;NDEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions) Precise @@ -1333,6 +1334,7 @@ false Default true + true true diff --git a/regamedll/msvc/ReGameDLL.vcxproj.filters b/regamedll/msvc/ReGameDLL.vcxproj.filters index f0cc26b6..8e4fe551 100644 --- a/regamedll/msvc/ReGameDLL.vcxproj.filters +++ b/regamedll/msvc/ReGameDLL.vcxproj.filters @@ -570,6 +570,9 @@ public\tier0 + + regamedll + diff --git a/regamedll/regamedll/classes_dummy.cpp b/regamedll/regamedll/classes_dummy.cpp new file mode 100644 index 00000000..c31c14d0 --- /dev/null +++ b/regamedll/regamedll/classes_dummy.cpp @@ -0,0 +1,79 @@ +#include "precompiled.h" + +class CDummyWeaponClass: + public CAK47, public CAUG, public CAWP, public CC4, + public CDEAGLE, public CELITE, public CFamas, public CFiveSeven, + public CFlashbang, public CG3SG1, public CGalil, public CGLOCK18, + public CHEGrenade, public CKnife, public CM3, public CM4A1, + public CM249, public CMAC10, public CMP5N, public CP90, + public CP228, public CSCOUT, public CSG550, public CSG552, + public CSmokeGrenade, public CTMP, public CUMP45, public CUSP, + public CXM1014 +{ +public: + virtual void Precache(void) {}; + virtual int Save(CSave &save) { return 0; }; + virtual int Restore(CRestore &restore) { return 0; }; + virtual int AddToPlayer(CBasePlayer *pPlayer) { return 0; }; + virtual int AddDuplicate(CBasePlayerItem *pItem) { return 0; }; + virtual BOOL CanDeploy(void) { return FALSE; }; + virtual BOOL IsWeapon(void) { return TRUE; } + virtual void Holster(int skiplocal = 0) {}; + virtual void UpdateItemInfo(void) {}; + virtual void ItemPostFrame(void) {}; + virtual int PrimaryAmmoIndex(void) { return 0; }; + virtual int SecondaryAmmoIndex(void) { return 0; }; + virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }; + virtual CBasePlayerItem *GetWeaponPtr(void) { return NULL; } + virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; + virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; + virtual int AddWeapon(void) { return 0; } + virtual BOOL PlayEmptySound(void) { return FALSE; }; + virtual void ResetEmptySound(void) {}; + virtual void SendWeaponAnim(int iAnim, int skiplocal = 0) {}; + virtual BOOL IsUseable(void) { return FALSE; }; + virtual void PrimaryAttack(void) {}; + virtual void SecondaryAttack(void) {}; + virtual void Reload(void) {}; + virtual void WeaponIdle(void) {}; + virtual void RetireWeapon(void) {}; + virtual BOOL ShouldWeaponIdle(void) { return FALSE; } + virtual BOOL UseDecrement(void) { return FALSE; } +}; + +class CDummyWeaponClassExtra: + public CDummyWeaponClass +{ +public: + virtual void Precache(void) {}; + virtual int Save(CSave &save) { return 0; }; + virtual int Restore(CRestore &restore) { return 0; }; + virtual int AddToPlayer(CBasePlayer *pPlayer) { return 0; }; + virtual int AddDuplicate(CBasePlayerItem *pItem) { return 0; }; + virtual BOOL CanDeploy(void) { return FALSE; }; + virtual BOOL IsWeapon(void) { return TRUE; } + virtual void Holster(int skiplocal = 0) {}; + virtual void UpdateItemInfo(void) {}; + virtual void ItemPostFrame(void) {}; + virtual int PrimaryAmmoIndex(void) { return 0; }; + virtual int SecondaryAmmoIndex(void) { return 0; }; + virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }; + virtual CBasePlayerItem *GetWeaponPtr(void) { return NULL; } + virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; + virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon) { return 0; }; + virtual int AddWeapon(void) { return 0; } + virtual BOOL PlayEmptySound(void) { return FALSE; }; + virtual void ResetEmptySound(void) {}; + virtual void SendWeaponAnim(int iAnim, int skiplocal = 0) {}; + virtual BOOL IsUseable(void) { return FALSE; }; + virtual void PrimaryAttack(void) {}; + virtual void SecondaryAttack(void) {}; + virtual void Reload(void) {}; + virtual void WeaponIdle(void) {}; + virtual void RetireWeapon(void) {}; + virtual BOOL ShouldWeaponIdle(void) { return FALSE; } + virtual BOOL UseDecrement(void) { return FALSE; } +}; + +volatile CDummyWeaponClass *g_pDummyWeaponClass = &CDummyWeaponClass(); +volatile CDummyWeaponClassExtra *g_pCDummyWeaponClassExtra = &CDummyWeaponClassExtra();