//========= Copyright © 2005-2007, Attitude Corporation, All rights reserved. ============// // // Author: Christopher 'StuD' Loy // Purpose: // File: inherited_gamerules.cpp // //=============================================================================// #include "cbase.h" #include "build_gamerules.h" #include "viewport_panel_names.h" #include "gameeventdefs.h" #include #include "ammodef.h" #ifdef CLIENT_DLL #include "c_hl2mp_player.h" #else #include "eventqueue.h" #include "player.h" #include "gamerules.h" #include "game.h" #include "items.h" #include "entitylist.h" #include "mapentities.h" #include "in_buttons.h" #include #include "voice_gamemgr.h" #include "iscorer.h" #include "hl2mp_player.h" #include "weapon_hl2mpbasehlmpcombatweapon.h" #include "team.h" #include "voice_gamemgr.h" #include "hl2mp_gameinterface.h" #include "hl2mp_cvars.h" #ifdef DEBUG #include "hl2mp_bot_temp.h" #endif #endif REGISTER_GAMERULES_CLASS( CInheritedGameRules ); BEGIN_NETWORK_TABLE_NOBASE( CInheritedGameRules, DT_InheritedGameRules ) #ifdef CLIENT_DLL #else #endif END_NETWORK_TABLE() LINK_ENTITY_TO_CLASS( inherited_gamerules, CInheritedGameRulesProxy ); IMPLEMENT_NETWORKCLASS_ALIASED( InheritedGameRulesProxy, DT_InheritedGameRulesProxy ) #ifdef CLIENT_DLL void RecvProxy_InheritedGameRules( const RecvProp *pProp, void **pOut, void *pData, int objectID ) { CInheritedGameRules *pRules = InheritedGameRules(); Assert( pRules ); *pOut = pRules; } BEGIN_RECV_TABLE( CInheritedGameRulesProxy, DT_InheritedGameRulesProxy ) RecvPropDataTable( "inherited_gamerules_data", 0, 0, &REFERENCE_RECV_TABLE( DT_InheritedGameRules ), RecvProxy_InheritedGameRules ) END_RECV_TABLE() #else void* SendProxy_InheritedGameRules( const SendProp *pProp, const void *pStructBase, const void *pData, CSendProxyRecipients *pRecipients, int objectID ) { CInheritedGameRules *pRules = InheritedGameRules(); Assert( pRules ); return pRules; } BEGIN_SEND_TABLE( CInheritedGameRulesProxy, DT_InheritedGameRulesProxy ) SendPropDataTable( "inherited_gamerules_data", 0, &REFERENCE_SEND_TABLE( DT_InheritedGameRules ), SendProxy_InheritedGameRules ) END_SEND_TABLE() #endif CInheritedGameRules::CInheritedGameRules() { #ifndef CLIENT_DLL #endif } CInheritedGameRules::~CInheritedGameRules( void ) { #ifndef CLIENT_DLL // Note, don't delete each team since they are in the gEntList and will // automatically be deleted from there, instead. g_Teams.Purge(); #endif } void CInheritedGameRules::Think( void ) { #ifndef CLIENT_DLL BaseClass::Think(); #endif } //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CInheritedGameRules::Precache( void ) { BaseClass::Precache(); } bool CInheritedGameRules::ClientCommand(const char *pcmd, CBaseEntity *pEdict ) { return BaseClass::ClientCommand( pcmd, pEdict ); }