diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/weapon_ifmbase.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/weapon_ifmbase.h')
| -rw-r--r-- | game/shared/weapon_ifmbase.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/game/shared/weapon_ifmbase.h b/game/shared/weapon_ifmbase.h new file mode 100644 index 0000000..cf0b93c --- /dev/null +++ b/game/shared/weapon_ifmbase.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//===========================================================================// + +#ifndef WEAPON_IFMBASE_H +#define WEAPON_IFMBASE_H +#ifdef _WIN32 +#pragma once +#endif + + +#if defined( CLIENT_DLL ) + #define CWeaponIFMBase C_WeaponIFMBase +#endif + +#if defined ( DOD_DLL ) + #include "weapon_dodbase.h" + #define CWeaponModBaseClass CWeaponDODBase +#elif defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) + #include "tf_weaponbase.h" + #define CWeaponModBaseClass CTFWeaponBase +#endif + +class CWeaponIFMBase : public CWeaponModBaseClass +{ +public: + DECLARE_CLASS( CWeaponIFMBase, CWeaponModBaseClass ); + DECLARE_NETWORKCLASS(); + DECLARE_PREDICTABLE(); + + CWeaponIFMBase(); + +#ifdef GAME_DLL + DECLARE_DATADESC(); +#endif + + // All predicted weapons need to implement and return true + virtual bool IsPredicted() const; + +// virtual void FallInit( void ); + +public: +#if defined( CLIENT_DLL ) + virtual bool ShouldPredict(); + virtual void OnDataChanged( DataUpdateType_t type ); +#else + virtual void Spawn(); + + // FIXME: How should this work? This is a hack to get things working + virtual const unsigned char *GetEncryptionKey( void ) { return NULL; } +#endif + +private: + CWeaponIFMBase( const CWeaponIFMBase & ); +}; + + +#endif // WEAPON_IFMBASE_H |