mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 20:46:03 +08:00
Update from SDK 2013
This commit is contained in:

committed by
Nicholas Hastings

parent
6d5c024820
commit
94b660e16e
@ -1,88 +1,88 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: The TF Game rules object
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef SDK_GAMERULES_H
|
||||
#define SDK_GAMERULES_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "teamplay_gamerules.h"
|
||||
#include "convar.h"
|
||||
#include "gamevars_shared.h"
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#include "c_baseplayer.h"
|
||||
#else
|
||||
#include "player.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#define CSDKGameRules C_SDKGameRules
|
||||
#define CSDKGameRulesProxy C_SDKGameRulesProxy
|
||||
#endif
|
||||
|
||||
|
||||
class CSDKGameRulesProxy : public CGameRulesProxy
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CSDKGameRulesProxy, CGameRulesProxy );
|
||||
DECLARE_NETWORKCLASS();
|
||||
};
|
||||
|
||||
|
||||
class CSDKGameRules : public CTeamplayRules
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CSDKGameRules, CTeamplayRules );
|
||||
|
||||
virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
|
||||
|
||||
virtual int PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget );
|
||||
virtual bool IsTeamplay( void ) { return false; }
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
|
||||
DECLARE_CLIENTCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
||||
|
||||
#else
|
||||
|
||||
DECLARE_SERVERCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
||||
|
||||
CSDKGameRules();
|
||||
virtual ~CSDKGameRules();
|
||||
|
||||
virtual bool ClientCommand( CBaseEntity *pEdict, const CCommand &args );
|
||||
virtual void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrcIn, float flRadius, int iClassIgnore );
|
||||
virtual void Think();
|
||||
|
||||
virtual const char *GetChatPrefix( bool bTeamOnly, CBasePlayer *pPlayer );
|
||||
|
||||
private:
|
||||
|
||||
void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrcIn, float flRadius, int iClassIgnore, bool bIgnoreWorld );
|
||||
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Gets us at the team fortress game rules
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
inline CSDKGameRules* SDKGameRules()
|
||||
{
|
||||
return static_cast<CSDKGameRules*>(g_pGameRules);
|
||||
}
|
||||
|
||||
|
||||
#endif // SDK_GAMERULES_H
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: The TF Game rules object
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef SDK_GAMERULES_H
|
||||
#define SDK_GAMERULES_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "teamplay_gamerules.h"
|
||||
#include "convar.h"
|
||||
#include "gamevars_shared.h"
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#include "c_baseplayer.h"
|
||||
#else
|
||||
#include "player.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#define CSDKGameRules C_SDKGameRules
|
||||
#define CSDKGameRulesProxy C_SDKGameRulesProxy
|
||||
#endif
|
||||
|
||||
|
||||
class CSDKGameRulesProxy : public CGameRulesProxy
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CSDKGameRulesProxy, CGameRulesProxy );
|
||||
DECLARE_NETWORKCLASS();
|
||||
};
|
||||
|
||||
|
||||
class CSDKGameRules : public CTeamplayRules
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS( CSDKGameRules, CTeamplayRules );
|
||||
|
||||
virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
|
||||
|
||||
virtual int PlayerRelationship( CBaseEntity *pPlayer, CBaseEntity *pTarget );
|
||||
virtual bool IsTeamplay( void ) { return false; }
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
|
||||
DECLARE_CLIENTCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
||||
|
||||
#else
|
||||
|
||||
DECLARE_SERVERCLASS_NOBASE(); // This makes datatables able to access our private vars.
|
||||
|
||||
CSDKGameRules();
|
||||
virtual ~CSDKGameRules();
|
||||
|
||||
virtual bool ClientCommand( CBaseEntity *pEdict, const CCommand &args );
|
||||
virtual void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrcIn, float flRadius, int iClassIgnore );
|
||||
virtual void Think();
|
||||
|
||||
virtual const char *GetChatPrefix( bool bTeamOnly, CBasePlayer *pPlayer );
|
||||
|
||||
private:
|
||||
|
||||
void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrcIn, float flRadius, int iClassIgnore, bool bIgnoreWorld );
|
||||
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Gets us at the team fortress game rules
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
inline CSDKGameRules* SDKGameRules()
|
||||
{
|
||||
return static_cast<CSDKGameRules*>(g_pGameRules);
|
||||
}
|
||||
|
||||
|
||||
#endif // SDK_GAMERULES_H
|
||||
|
Reference in New Issue
Block a user