Ignore ReHLDS initialization on listenserver (#425)
* Remove duplicated files * Ignore ReHLDS initialization if not a dedicated server
This commit is contained in:
parent
9551c70c59
commit
da80667fb0
@ -1,121 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
template<typename t_ret, typename ...t_args>
|
||||
class IHookChain {
|
||||
protected:
|
||||
virtual ~IHookChain() {}
|
||||
|
||||
public:
|
||||
virtual t_ret callNext(t_args... args) = 0;
|
||||
virtual t_ret callOriginal(t_args... args) = 0;
|
||||
};
|
||||
|
||||
template<typename t_ret, typename t_class, typename ...t_args>
|
||||
class IHookChainClass {
|
||||
protected:
|
||||
virtual ~IHookChainClass() {}
|
||||
|
||||
public:
|
||||
virtual t_ret callNext(t_class *, t_args... args) = 0;
|
||||
virtual t_ret callOriginal(t_class *, t_args... args) = 0;
|
||||
};
|
||||
|
||||
template<typename ...t_args>
|
||||
class IVoidHookChain
|
||||
{
|
||||
protected:
|
||||
virtual ~IVoidHookChain() {}
|
||||
|
||||
public:
|
||||
virtual void callNext(t_args... args) = 0;
|
||||
virtual void callOriginal(t_args... args) = 0;
|
||||
};
|
||||
|
||||
template<typename t_class, typename ...t_args>
|
||||
class IVoidHookChainClass
|
||||
{
|
||||
protected:
|
||||
virtual ~IVoidHookChainClass() {}
|
||||
|
||||
public:
|
||||
virtual void callNext(t_class *, t_args... args) = 0;
|
||||
virtual void callOriginal(t_class *, t_args... args) = 0;
|
||||
};
|
||||
|
||||
// Specifies priorities for hooks call order in the chain.
|
||||
// For equal priorities first registered hook will be called first.
|
||||
enum HookChainPriority
|
||||
{
|
||||
HC_PRIORITY_UNINTERRUPTABLE = 255, // Hook will be called before other hooks.
|
||||
HC_PRIORITY_HIGH = 192, // Hook will be called before hooks with default priority.
|
||||
HC_PRIORITY_DEFAULT = 128, // Default hook call priority.
|
||||
HC_PRIORITY_MEDIUM = 64, // Hook will be called after hooks with default priority.
|
||||
HC_PRIORITY_LOW = 0, // Hook will be called after all other hooks.
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename t_ret, typename ...t_args>
|
||||
class IHookChainRegistry {
|
||||
public:
|
||||
typedef t_ret(*hookfunc_t)(IHookChain<t_ret, t_args...>*, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook, int priority = HC_PRIORITY_DEFAULT) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename t_ret, typename t_class, typename ...t_args>
|
||||
class IHookChainRegistryClass {
|
||||
public:
|
||||
typedef t_ret(*hookfunc_t)(IHookChainClass<t_ret, t_class, t_args...>*, t_class *, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook, int priority = HC_PRIORITY_DEFAULT) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename ...t_args>
|
||||
class IVoidHookChainRegistry {
|
||||
public:
|
||||
typedef void(*hookfunc_t)(IVoidHookChain<t_args...>*, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook, int priority = HC_PRIORITY_DEFAULT) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename t_class, typename ...t_args>
|
||||
class IVoidHookChainRegistryClass {
|
||||
public:
|
||||
typedef void(*hookfunc_t)(IVoidHookChainClass<t_class, t_args...>*, t_class *, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook, int priority = HC_PRIORITY_DEFAULT) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
@ -1,482 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <engine_strucs.h>
|
||||
#include "regamedll_interfaces.h"
|
||||
#include "regamedll_const.h"
|
||||
#include "../common/hookchains.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
||||
|
||||
// CBasePlayer::Spawn hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Spawn;
|
||||
|
||||
// CBasePlayer::Precache hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Precache;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Precache;
|
||||
|
||||
// CBasePlayer::ObjectCaps hook
|
||||
typedef IHookChainClass<int, class CBasePlayer> IReGameHook_CBasePlayer_ObjectCaps;
|
||||
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_ObjectCaps;
|
||||
|
||||
// CBasePlayer::Classify hook
|
||||
typedef IHookChainClass<int, class CBasePlayer> IReGameHook_CBasePlayer_Classify;
|
||||
typedef IHookChainRegistryClass<int, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Classify;
|
||||
|
||||
// CBasePlayer::TraceAttack hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHook_CBasePlayer_TraceAttack;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, float, Vector &, TraceResult *, int> IReGameHookRegistry_CBasePlayer_TraceAttack;
|
||||
|
||||
// CBasePlayer::TakeDamage hook
|
||||
typedef IHookChainClass<BOOL, class CBasePlayer, struct entvars_s *, struct entvars_s *, float&, int> IReGameHook_CBasePlayer_TakeDamage;
|
||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, struct entvars_s *, struct entvars_s *, float&, int> IReGameHookRegistry_CBasePlayer_TakeDamage;
|
||||
|
||||
// CBasePlayer::TakeHealth hook
|
||||
typedef IHookChainClass<BOOL, class CBasePlayer, float, int> IReGameHook_CBasePlayer_TakeHealth;
|
||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, float, int> IReGameHookRegistry_CBasePlayer_TakeHealth;
|
||||
|
||||
// CBasePlayer::Killed hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, struct entvars_s *, int> IReGameHook_CBasePlayer_Killed;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, struct entvars_s *, int> IReGameHookRegistry_CBasePlayer_Killed;
|
||||
|
||||
// CBasePlayer::AddPoints hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPoints;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPoints;
|
||||
|
||||
// CBasePlayer::AddPointsToTeam hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, int, BOOL> IReGameHook_CBasePlayer_AddPointsToTeam;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, BOOL> IReGameHookRegistry_CBasePlayer_AddPointsToTeam;
|
||||
|
||||
// CBasePlayer::AddPlayerItem hook
|
||||
typedef IHookChainClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHook_CBasePlayer_AddPlayerItem;
|
||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHookRegistry_CBasePlayer_AddPlayerItem;
|
||||
|
||||
// CBasePlayer::RemovePlayerItem hook
|
||||
typedef IHookChainClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHook_CBasePlayer_RemovePlayerItem;
|
||||
typedef IHookChainRegistryClass<BOOL, class CBasePlayer, class CBasePlayerItem *> IReGameHookRegistry_CBasePlayer_RemovePlayerItem;
|
||||
|
||||
// CBasePlayer::GiveAmmo hook
|
||||
typedef IHookChainClass<int, class CBasePlayer, int , char *, int> IReGameHook_CBasePlayer_GiveAmmo;
|
||||
typedef IHookChainRegistryClass<int, class CBasePlayer, int , char *, int> IReGameHookRegistry_CBasePlayer_GiveAmmo;
|
||||
|
||||
// CBasePlayer::ResetMaxSpeed hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_ResetMaxSpeed;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_ResetMaxSpeed;
|
||||
|
||||
// CBasePlayer::Jump hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Jump;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Jump;
|
||||
|
||||
// CBasePlayer::Duck hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Duck;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Duck;
|
||||
|
||||
// CBasePlayer::PreThink hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_PreThink;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_PreThink;
|
||||
|
||||
// CBasePlayer::PostThink hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_PostThink;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_PostThink;
|
||||
|
||||
// CBasePlayer::UpdateClientData hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_UpdateClientData;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_UpdateClientData;
|
||||
|
||||
// CBasePlayer::ImpulseCommands hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_ImpulseCommands;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_ImpulseCommands;
|
||||
|
||||
// CBasePlayer::RoundRespawn hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_RoundRespawn;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_RoundRespawn;
|
||||
|
||||
// CBasePlayer::Blind hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
||||
|
||||
// CBasePlayer::Observer_IsValidTarget hook
|
||||
typedef IHookChainClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||
typedef IHookChainRegistryClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||
|
||||
// CBasePlayer::SetAnimation hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, PLAYER_ANIM> IReGameHook_CBasePlayer_SetAnimation;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, PLAYER_ANIM> IReGameHookRegistry_CBasePlayer_SetAnimation;
|
||||
|
||||
// CBasePlayer::GiveDefaultItems hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_GiveDefaultItems;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_GiveDefaultItems;
|
||||
|
||||
// CBasePlayer::GiveNamedItem hook
|
||||
typedef IHookChainClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHook_CBasePlayer_GiveNamedItem;
|
||||
typedef IHookChainRegistryClass<class CBaseEntity *, class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_GiveNamedItem;
|
||||
|
||||
// CBasePlayer::AddAccount hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, int, RewardType, bool> IReGameHook_CBasePlayer_AddAccount;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, int, RewardType, bool> IReGameHookRegistry_CBasePlayer_AddAccount;
|
||||
|
||||
// CBasePlayer::GiveShield hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, bool> IReGameHook_CBasePlayer_GiveShield;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_GiveShield;
|
||||
|
||||
// CBasePlayer:SetClientUserInfoModel hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoModel;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, char *, char *> IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel;
|
||||
|
||||
// CBasePlayer:SetClientUserInfoName hook
|
||||
typedef IHookChainClass<bool, class CBasePlayer, char *, char *> IReGameHook_CBasePlayer_SetClientUserInfoName;
|
||||
typedef IHookChainRegistryClass<bool, class CBasePlayer, char *, char *> IReGameHookRegistry_CBasePlayer_SetClientUserInfoName;
|
||||
|
||||
// CBasePlayer::HasRestrictItem hook
|
||||
typedef IHookChainClass<bool, class CBasePlayer, ItemID, ItemRestType> IReGameHook_CBasePlayer_HasRestrictItem;
|
||||
typedef IHookChainRegistryClass<bool, class CBasePlayer, ItemID, ItemRestType> IReGameHookRegistry_CBasePlayer_HasRestrictItem;
|
||||
|
||||
// CBasePlayer::DropPlayerItem hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropPlayerItem;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
||||
|
||||
// CBasePlayer::DropShield hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, bool> IReGameHook_CBasePlayer_DropShield;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool> IReGameHookRegistry_CBasePlayer_DropShield;
|
||||
|
||||
// CBasePlayer::OnSpawnEquip hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, bool, bool> IReGameHook_CBasePlayer_OnSpawnEquip;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, bool, bool> IReGameHookRegistry_CBasePlayer_OnSpawnEquip;
|
||||
|
||||
// CBasePlayer::Radio hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, const char *, const char *, short, bool> IReGameHook_CBasePlayer_Radio;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *, const char *, short, bool> IReGameHookRegistry_CBasePlayer_Radio;
|
||||
|
||||
// CBasePlayer::Disappear hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Disappear;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_Disappear;
|
||||
|
||||
// CBasePlayer::MakeVIP hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_MakeVIP;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeVIP;
|
||||
|
||||
// CBasePlayer::MakeBomber hook
|
||||
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_MakeBomber;
|
||||
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_MakeBomber;
|
||||
|
||||
// CBasePlayer::StartObserver hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, Vector &, Vector &> IReGameHook_CBasePlayer_StartObserver;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, Vector &, Vector &> IReGameHookRegistry_CBasePlayer_StartObserver;
|
||||
|
||||
// CBasePlayer::GetIntoGame hook
|
||||
typedef IHookChainClass<bool, class CBasePlayer> IReGameHook_CBasePlayer_GetIntoGame;
|
||||
typedef IHookChainRegistryClass<bool, class CBasePlayer> IReGameHookRegistry_CBasePlayer_GetIntoGame;
|
||||
|
||||
// CBaseAnimating::ResetSequenceInfo hook
|
||||
typedef IVoidHookChainClass<class CBaseAnimating> IReGameHook_CBaseAnimating_ResetSequenceInfo;
|
||||
typedef IVoidHookChainRegistryClass<class CBaseAnimating> IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo;
|
||||
|
||||
// GetForceCamera hook
|
||||
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
||||
|
||||
// PlayerBlind hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHook_PlayerBlind;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, float, float, int, Vector &> IReGameHookRegistry_PlayerBlind;
|
||||
|
||||
// RadiusFlash_TraceLine hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHook_RadiusFlash_TraceLine;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *, Vector &, Vector &, TraceResult *> IReGameHookRegistry_RadiusFlash_TraceLine;
|
||||
|
||||
// RoundEnd hook
|
||||
typedef IHookChain<bool, int, ScenarioEventEndRound, float> IReGameHook_RoundEnd;
|
||||
typedef IHookChainRegistry<bool, int, ScenarioEventEndRound, float> IReGameHookRegistry_RoundEnd;
|
||||
|
||||
// InstallGameRules hook
|
||||
typedef IHookChain<class CGameRules *> IReGameHook_InstallGameRules;
|
||||
typedef IHookChainRegistry<class CGameRules *> IReGameHookRegistry_InstallGameRules;
|
||||
|
||||
// PM_Init hook
|
||||
typedef IVoidHookChain<struct playermove_s *> IReGameHook_PM_Init;
|
||||
typedef IVoidHookChainRegistry<struct playermove_s *> IReGameHookRegistry_PM_Init;
|
||||
|
||||
// PM_Move hook
|
||||
typedef IVoidHookChain<struct playermove_s *, int> IReGameHook_PM_Move;
|
||||
typedef IVoidHookChainRegistry<struct playermove_s *, int> IReGameHookRegistry_PM_Move;
|
||||
|
||||
// PM_AirMove hook
|
||||
typedef IVoidHookChain<int> IReGameHook_PM_AirMove;
|
||||
typedef IVoidHookChainRegistry<int> IReGameHookRegistry_PM_AirMove;
|
||||
|
||||
// HandleMenu_ChooseAppearance hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseAppearance;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseAppearance;
|
||||
|
||||
// HandleMenu_ChooseTeam hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseTeam;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseTeam;
|
||||
|
||||
// ShowMenu hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, int, int, BOOL, char *> IReGameHook_ShowMenu;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int, int, BOOL, char *> IReGameHookRegistry_ShowMenu;
|
||||
|
||||
// ShowVGUIMenu hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, int, int, char *> IReGameHook_ShowVGUIMenu;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int, int, char *> IReGameHookRegistry_ShowVGUIMenu;
|
||||
|
||||
// BuyGunAmmo hook
|
||||
typedef IHookChain<bool, class CBasePlayer *, class CBasePlayerItem *, bool> IReGameHook_BuyGunAmmo;
|
||||
typedef IHookChainRegistry<bool, class CBasePlayer *, class CBasePlayerItem *, bool> IReGameHookRegistry_BuyGunAmmo;
|
||||
|
||||
// BuyWeaponByWeaponID hook
|
||||
typedef IHookChain<class CBaseEntity *, class CBasePlayer *, WeaponIdType> IReGameHook_BuyWeaponByWeaponID;
|
||||
typedef IHookChainRegistry<class CBaseEntity *, class CBasePlayer *, WeaponIdType> IReGameHookRegistry_BuyWeaponByWeaponID;
|
||||
|
||||
// InternalCommand hook
|
||||
typedef IVoidHookChain<edict_t *, const char *, const char *> IReGameHook_InternalCommand;
|
||||
typedef IVoidHookChainRegistry<edict_t *, const char *, const char *> IReGameHookRegistry_InternalCommand;
|
||||
|
||||
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_FShouldSwitchWeapon;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon;
|
||||
|
||||
// CHalfLifeMultiplay::GetNextBestWeapon hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_GetNextBestWeapon;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHookRegistry_CSGameRules_GetNextBestWeapon;
|
||||
|
||||
// CHalfLifeMultiplay::FlPlayerFallDamage hook
|
||||
typedef IHookChain<float, class CBasePlayer *> IReGameHook_CSGameRules_FlPlayerFallDamage;
|
||||
typedef IHookChainRegistry<float, class CBasePlayer *> IReGameHookRegistry_CSGameRules_FlPlayerFallDamage;
|
||||
|
||||
// CHalfLifeMultiplay::FPlayerCanTakeDamage hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, CBaseEntity *> IReGameHook_CSGameRules_FPlayerCanTakeDamage;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, CBaseEntity *> IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage;
|
||||
|
||||
// CHalfLifeMultiplay::PlayerSpawn hook
|
||||
typedef IVoidHookChain<class CBasePlayer *> IReGameHook_CSGameRules_PlayerSpawn;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *> IReGameHookRegistry_CSGameRules_PlayerSpawn;
|
||||
|
||||
// CHalfLifeMultiplay::FPlayerCanRespawn hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *> IReGameHook_CSGameRules_FPlayerCanRespawn;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *> IReGameHookRegistry_CSGameRules_FPlayerCanRespawn;
|
||||
|
||||
// CHalfLifeMultiplay::GetPlayerSpawnSpot hook
|
||||
typedef IHookChain<struct edict_s *, class CBasePlayer *> IReGameHook_CSGameRules_GetPlayerSpawnSpot;
|
||||
typedef IHookChainRegistry<struct edict_s *, class CBasePlayer *> IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot;
|
||||
|
||||
// CHalfLifeMultiplay::ClientUserInfoChanged hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, char *> IReGameHook_CSGameRules_ClientUserInfoChanged;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, char *> IReGameHookRegistry_CSGameRules_ClientUserInfoChanged;
|
||||
|
||||
// CHalfLifeMultiplay::PlayerKilled hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_PlayerKilled;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_PlayerKilled;
|
||||
|
||||
// CHalfLifeMultiplay::DeathNotice hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHook_CSGameRules_DeathNotice;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, struct entvars_s *, struct entvars_s *> IReGameHookRegistry_CSGameRules_DeathNotice;
|
||||
|
||||
// CHalfLifeMultiplay::CanHavePlayerItem hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_CanHavePlayerItem;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHookRegistry_CSGameRules_CanHavePlayerItem;
|
||||
|
||||
// CHalfLifeMultiplay::DeadPlayerWeapons hook
|
||||
typedef IHookChain<int, class CBasePlayer *> IReGameHook_CSGameRules_DeadPlayerWeapons;
|
||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_CSGameRules_DeadPlayerWeapons;
|
||||
|
||||
// CHalfLifeMultiplay::ServerDeactivate hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_ServerDeactivate;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_ServerDeactivate;
|
||||
|
||||
// CHalfLifeMultiplay::CheckMapConditions hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CheckMapConditions;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CheckMapConditions;
|
||||
|
||||
// CHalfLifeMultiplay::CleanUpMap hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CleanUpMap;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CleanUpMap;
|
||||
|
||||
// CHalfLifeMultiplay::RestartRound hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_RestartRound;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_RestartRound;
|
||||
|
||||
// CHalfLifeMultiplay::CheckWinConditions hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_CheckWinConditions;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_CheckWinConditions;
|
||||
|
||||
// CHalfLifeMultiplay::RemoveGuns hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_RemoveGuns;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_RemoveGuns;
|
||||
|
||||
// CHalfLifeMultiplay::GiveC4 hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_GiveC4;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_GiveC4;
|
||||
|
||||
// CHalfLifeMultiplay::ChangeLevel hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_ChangeLevel;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_ChangeLevel;
|
||||
|
||||
// CHalfLifeMultiplay::GoToIntermission hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_GoToIntermission;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_GoToIntermission;
|
||||
|
||||
// CHalfLifeMultiplay::BalanceTeams hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_BalanceTeams;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||
|
||||
// CHalfLifeMultiplay::OnRoundFreezeEnd hook
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_OnRoundFreezeEnd;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
||||
|
||||
// PM_UpdateStepSound hook
|
||||
typedef IVoidHookChain<> IReGameHook_PM_UpdateStepSound;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_PM_UpdateStepSound;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
|
||||
// CBasePlayer virtual
|
||||
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Precache* CBasePlayer_Precache() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_ObjectCaps* CBasePlayer_ObjectCaps() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Classify* CBasePlayer_Classify() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_TraceAttack* CBasePlayer_TraceAttack() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_TakeDamage* CBasePlayer_TakeDamage() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_TakeHealth* CBasePlayer_TakeHealth() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Killed* CBasePlayer_Killed() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_AddPoints* CBasePlayer_AddPoints() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_AddPointsToTeam* CBasePlayer_AddPointsToTeam() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_AddPlayerItem* CBasePlayer_AddPlayerItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_RemovePlayerItem* CBasePlayer_RemovePlayerItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_GiveAmmo* CBasePlayer_GiveAmmo() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_ResetMaxSpeed* CBasePlayer_ResetMaxSpeed() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Jump* CBasePlayer_Jump() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Duck* CBasePlayer_Duck() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_PreThink* CBasePlayer_PreThink() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_PostThink* CBasePlayer_PostThink() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_UpdateClientData* CBasePlayer_UpdateClientData() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_ImpulseCommands* CBasePlayer_ImpulseCommands() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_RoundRespawn* CBasePlayer_RoundRespawn() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Blind* CBasePlayer_Blind() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget* CBasePlayer_Observer_IsValidTarget() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_SetAnimation* CBasePlayer_SetAnimation() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_GiveDefaultItems* CBasePlayer_GiveDefaultItems() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_GiveNamedItem* CBasePlayer_GiveNamedItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_AddAccount* CBasePlayer_AddAccount() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_GiveShield* CBasePlayer_GiveShield() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoModel* CBasePlayer_SetClientUserInfoModel() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_SetClientUserInfoName* CBasePlayer_SetClientUserInfoName() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_HasRestrictItem* CBasePlayer_HasRestrictItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem* CBasePlayer_DropPlayerItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropShield* CBasePlayer_DropShield() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_OnSpawnEquip* CBasePlayer_OnSpawnEquip() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Radio* CBasePlayer_Radio() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Disappear* CBasePlayer_Disappear() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_MakeVIP* CBasePlayer_MakeVIP() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_MakeBomber* CBasePlayer_MakeBomber() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_StartObserver* CBasePlayer_StartObserver() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_GetIntoGame* CBasePlayer_GetIntoGame() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CBaseAnimating_ResetSequenceInfo* CBaseAnimating_ResetSequenceInfo() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera() = 0;
|
||||
virtual IReGameHookRegistry_PlayerBlind* PlayerBlind() = 0;
|
||||
virtual IReGameHookRegistry_RadiusFlash_TraceLine* RadiusFlash_TraceLine() = 0;
|
||||
virtual IReGameHookRegistry_RoundEnd* RoundEnd() = 0;
|
||||
virtual IReGameHookRegistry_InstallGameRules* InstallGameRules() = 0;
|
||||
virtual IReGameHookRegistry_PM_Init* PM_Init() = 0;
|
||||
virtual IReGameHookRegistry_PM_Move* PM_Move() = 0;
|
||||
virtual IReGameHookRegistry_PM_AirMove* PM_AirMove() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance* HandleMenu_ChooseAppearance() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseTeam* HandleMenu_ChooseTeam() = 0;
|
||||
virtual IReGameHookRegistry_ShowMenu* ShowMenu() = 0;
|
||||
virtual IReGameHookRegistry_ShowVGUIMenu* ShowVGUIMenu() = 0;
|
||||
virtual IReGameHookRegistry_BuyGunAmmo* BuyGunAmmo() = 0;
|
||||
virtual IReGameHookRegistry_BuyWeaponByWeaponID* BuyWeaponByWeaponID() = 0;
|
||||
virtual IReGameHookRegistry_InternalCommand* InternalCommand() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CSGameRules_FShouldSwitchWeapon() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CSGameRules_GetNextBestWeapon() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_FlPlayerFallDamage* CSGameRules_FlPlayerFallDamage() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_FPlayerCanTakeDamage* CSGameRules_FPlayerCanTakeDamage() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_PlayerSpawn* CSGameRules_PlayerSpawn() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_FPlayerCanRespawn* CSGameRules_FPlayerCanRespawn() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GetPlayerSpawnSpot* CSGameRules_GetPlayerSpawnSpot() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_ClientUserInfoChanged* CSGameRules_ClientUserInfoChanged() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_PlayerKilled* CSGameRules_PlayerKilled() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_DeathNotice* CSGameRules_DeathNotice() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_CanHavePlayerItem* CSGameRules_CanHavePlayerItem() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_DeadPlayerWeapons* CSGameRules_DeadPlayerWeapons() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_ServerDeactivate* CSGameRules_ServerDeactivate() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_CheckMapConditions* CSGameRules_CheckMapConditions() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_CleanUpMap* CSGameRules_CleanUpMap() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_RestartRound* CSGameRules_RestartRound() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_CheckWinConditions* CSGameRules_CheckWinConditions() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_RemoveGuns* CSGameRules_RemoveGuns() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GiveC4* CSGameRules_GiveC4() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_ChangeLevel* CSGameRules_ChangeLevel() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GoToIntermission* CSGameRules_GoToIntermission() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0;
|
||||
virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
struct edict_s *(*CREATE_NAMED_ENTITY2)(string_t iClass);
|
||||
void (*ChangeString)(char *&dest, const char *source);
|
||||
void (*RadiusDamage)(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType);
|
||||
void (*ClearMultiDamage)();
|
||||
void (*ApplyMultiDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker);
|
||||
void (*AddMultiDamage)(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType);
|
||||
class CBaseEntity *(*UTIL_FindEntityByString)(class CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue);
|
||||
void (*AddEntityHashValue)(entvars_t *pev, const char *value, hash_types_e fieldType);
|
||||
void (*RemoveEntityHashValue)(entvars_t *pev, const char *value, hash_types_e fieldType);
|
||||
int (*Cmd_Argc)();
|
||||
const char *(*Cmd_Argv)(int i);
|
||||
};
|
||||
|
||||
class IReGameApi {
|
||||
public:
|
||||
virtual ~IReGameApi() {}
|
||||
|
||||
virtual int GetMajorVersion() = 0;
|
||||
virtual int GetMinorVersion() = 0;
|
||||
virtual const ReGameFuncs_t* GetFuncs() = 0;
|
||||
virtual IReGameHookchains* GetHookchains() = 0;
|
||||
|
||||
virtual class CGameRules* GetGameRules() = 0;
|
||||
virtual struct WeaponInfoStruct* GetWeaponInfo(int weaponID) = 0;
|
||||
virtual struct WeaponInfoStruct* GetWeaponInfo(const char* weaponName) = 0;
|
||||
virtual struct playermove_s* GetPlayerMove() = 0;
|
||||
virtual struct WeaponSlotInfo* GetWeaponSlot(WeaponIdType weaponID) = 0;
|
||||
virtual struct WeaponSlotInfo* GetWeaponSlot(const char* weaponName) = 0;
|
||||
virtual struct ItemInfo* GetItemInfo(WeaponIdType weaponID) = 0;
|
||||
virtual struct AmmoInfo* GetAmmoInfo(AmmoType ammoID) = 0;
|
||||
};
|
||||
|
||||
#define VRE_GAMEDLL_API_VERSION "VRE_GAMEDLL_API_VERSION001"
|
@ -1,740 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// custom enum
|
||||
enum ArmorType
|
||||
{
|
||||
ARMOR_NONE, // no armor
|
||||
ARMOR_KEVLAR, // body vest only
|
||||
ARMOR_VESTHELM, // vest and helmet
|
||||
};
|
||||
|
||||
enum ArmouryItemPack
|
||||
{
|
||||
ARMOURY_MP5NAVY,
|
||||
ARMOURY_TMP,
|
||||
ARMOURY_P90,
|
||||
ARMOURY_MAC10,
|
||||
ARMOURY_AK47,
|
||||
ARMOURY_SG552,
|
||||
ARMOURY_M4A1,
|
||||
ARMOURY_AUG,
|
||||
ARMOURY_SCOUT,
|
||||
ARMOURY_G3SG1,
|
||||
ARMOURY_AWP,
|
||||
ARMOURY_M3,
|
||||
ARMOURY_XM1014,
|
||||
ARMOURY_M249,
|
||||
ARMOURY_FLASHBANG,
|
||||
ARMOURY_HEGRENADE,
|
||||
ARMOURY_KEVLAR,
|
||||
ARMOURY_ASSAULT,
|
||||
ARMOURY_SMOKEGRENADE,
|
||||
ARMOURY_GLOCK18,
|
||||
ARMOURY_USP,
|
||||
ARMOURY_ELITE,
|
||||
ARMOURY_FIVESEVEN,
|
||||
ARMOURY_P228,
|
||||
ARMOURY_DEAGLE,
|
||||
ARMOURY_FAMAS,
|
||||
ARMOURY_SG550,
|
||||
ARMOURY_GALIL,
|
||||
ARMOURY_UMP45,
|
||||
ARMOURY_SHIELD
|
||||
};
|
||||
|
||||
struct AmmoInfo
|
||||
{
|
||||
const char *pszName;
|
||||
int iId;
|
||||
};
|
||||
|
||||
struct MULTIDAMAGE
|
||||
{
|
||||
CBaseEntity *pEntity;
|
||||
float amount;
|
||||
int type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum ItemRestType
|
||||
{
|
||||
ITEM_TYPE_BUYING, // when a player buying items
|
||||
ITEM_TYPE_TOUCHED, // when the player touches with a weaponbox or armoury_entity
|
||||
ITEM_TYPE_EQUIPPED // when a entity game_player_equip gives item to player or default item's on player spawn
|
||||
};
|
||||
|
||||
// constant items
|
||||
#define ITEM_ID_ANTIDOTE 2
|
||||
#define ITEM_ID_SECURITY 3
|
||||
|
||||
enum ItemID
|
||||
{
|
||||
ITEM_NONE = -1,
|
||||
ITEM_SHIELDGUN,
|
||||
ITEM_P228,
|
||||
ITEM_GLOCK,
|
||||
ITEM_SCOUT,
|
||||
ITEM_HEGRENADE,
|
||||
ITEM_XM1014,
|
||||
ITEM_C4,
|
||||
ITEM_MAC10,
|
||||
ITEM_AUG,
|
||||
ITEM_SMOKEGRENADE,
|
||||
ITEM_ELITE,
|
||||
ITEM_FIVESEVEN,
|
||||
ITEM_UMP45,
|
||||
ITEM_SG550,
|
||||
ITEM_GALIL,
|
||||
ITEM_FAMAS,
|
||||
ITEM_USP,
|
||||
ITEM_GLOCK18,
|
||||
ITEM_AWP,
|
||||
ITEM_MP5N,
|
||||
ITEM_M249,
|
||||
ITEM_M3,
|
||||
ITEM_M4A1,
|
||||
ITEM_TMP,
|
||||
ITEM_G3SG1,
|
||||
ITEM_FLASHBANG,
|
||||
ITEM_DEAGLE,
|
||||
ITEM_SG552,
|
||||
ITEM_AK47,
|
||||
ITEM_KNIFE,
|
||||
ITEM_P90,
|
||||
ITEM_NVG,
|
||||
ITEM_DEFUSEKIT,
|
||||
ITEM_KEVLAR,
|
||||
ITEM_ASSAULT,
|
||||
ITEM_LONGJUMP,
|
||||
ITEM_SODACAN,
|
||||
ITEM_HEALTHKIT,
|
||||
ITEM_ANTIDOTE,
|
||||
ITEM_BATTERY
|
||||
};
|
||||
|
||||
// custom enum
|
||||
enum RewardType
|
||||
{
|
||||
RT_NONE,
|
||||
RT_ROUND_BONUS,
|
||||
RT_PLAYER_RESET,
|
||||
RT_PLAYER_JOIN,
|
||||
RT_PLAYER_SPEC_JOIN,
|
||||
RT_PLAYER_BOUGHT_SOMETHING,
|
||||
RT_HOSTAGE_TOOK,
|
||||
RT_HOSTAGE_RESCUED,
|
||||
RT_HOSTAGE_DAMAGED,
|
||||
RT_HOSTAGE_KILLED,
|
||||
RT_TEAMMATES_KILLED,
|
||||
RT_ENEMY_KILLED,
|
||||
RT_INTO_GAME,
|
||||
RT_VIP_KILLED,
|
||||
RT_VIP_RESCUED_MYSELF
|
||||
};
|
||||
|
||||
enum PLAYER_ANIM
|
||||
{
|
||||
PLAYER_IDLE,
|
||||
PLAYER_WALK,
|
||||
PLAYER_JUMP,
|
||||
PLAYER_SUPERJUMP,
|
||||
PLAYER_DIE,
|
||||
PLAYER_ATTACK1,
|
||||
PLAYER_ATTACK2,
|
||||
PLAYER_FLINCH,
|
||||
PLAYER_LARGE_FLINCH,
|
||||
PLAYER_RELOAD,
|
||||
PLAYER_HOLDBOMB
|
||||
};
|
||||
|
||||
enum TeamName
|
||||
{
|
||||
UNASSIGNED,
|
||||
TERRORIST,
|
||||
CT,
|
||||
SPECTATOR,
|
||||
};
|
||||
|
||||
enum ModelName
|
||||
{
|
||||
MODEL_UNASSIGNED,
|
||||
MODEL_URBAN,
|
||||
MODEL_TERROR,
|
||||
MODEL_LEET,
|
||||
MODEL_ARCTIC,
|
||||
MODEL_GSG9,
|
||||
MODEL_GIGN,
|
||||
MODEL_SAS,
|
||||
MODEL_GUERILLA,
|
||||
MODEL_VIP,
|
||||
MODEL_MILITIA,
|
||||
MODEL_SPETSNAZ,
|
||||
MODEL_AUTO
|
||||
};
|
||||
|
||||
enum JoinState
|
||||
{
|
||||
JOINED,
|
||||
SHOWLTEXT,
|
||||
READINGLTEXT,
|
||||
SHOWTEAMSELECT,
|
||||
PICKINGTEAM,
|
||||
GETINTOGAME
|
||||
};
|
||||
|
||||
enum TrackCommands
|
||||
{
|
||||
CMD_SAY = 0,
|
||||
CMD_SAYTEAM,
|
||||
CMD_FULLUPDATE,
|
||||
CMD_VOTE,
|
||||
CMD_VOTEMAP,
|
||||
CMD_LISTMAPS,
|
||||
CMD_LISTPLAYERS,
|
||||
CMD_NIGHTVISION,
|
||||
COMMANDS_TO_TRACK,
|
||||
};
|
||||
|
||||
struct RebuyStruct
|
||||
{
|
||||
int m_primaryWeapon;
|
||||
int m_primaryAmmo;
|
||||
int m_secondaryWeapon;
|
||||
int m_secondaryAmmo;
|
||||
int m_heGrenade;
|
||||
int m_flashbang;
|
||||
int m_smokeGrenade;
|
||||
int m_defuser;
|
||||
int m_nightVision;
|
||||
ArmorType m_armor;
|
||||
};
|
||||
|
||||
enum ThrowDirection
|
||||
{
|
||||
THROW_NONE,
|
||||
THROW_FORWARD,
|
||||
THROW_BACKWARD,
|
||||
THROW_HITVEL,
|
||||
THROW_BOMB,
|
||||
THROW_GRENADE,
|
||||
THROW_HITVEL_MINUS_AIRVEL
|
||||
};
|
||||
|
||||
enum sbar_data
|
||||
{
|
||||
SBAR_ID_TARGETTYPE = 1,
|
||||
SBAR_ID_TARGETNAME,
|
||||
SBAR_ID_TARGETHEALTH,
|
||||
SBAR_END
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
WINSTATUS_CTS = 1,
|
||||
WINSTATUS_TERRORISTS,
|
||||
WINSTATUS_DRAW,
|
||||
};
|
||||
|
||||
// custom enum
|
||||
// used for EndRoundMessage() logged messages
|
||||
enum ScenarioEventEndRound
|
||||
{
|
||||
ROUND_NONE,
|
||||
ROUND_TARGET_BOMB,
|
||||
ROUND_VIP_ESCAPED,
|
||||
ROUND_VIP_ASSASSINATED,
|
||||
ROUND_TERRORISTS_ESCAPED,
|
||||
ROUND_CTS_PREVENT_ESCAPE,
|
||||
ROUND_ESCAPING_TERRORISTS_NEUTRALIZED,
|
||||
ROUND_BOMB_DEFUSED,
|
||||
ROUND_CTS_WIN,
|
||||
ROUND_TERRORISTS_WIN,
|
||||
ROUND_END_DRAW,
|
||||
ROUND_ALL_HOSTAGES_RESCUED,
|
||||
ROUND_TARGET_SAVED,
|
||||
ROUND_HOSTAGE_NOT_RESCUED,
|
||||
ROUND_TERRORISTS_NOT_ESCAPED,
|
||||
ROUND_VIP_NOT_ESCAPED,
|
||||
ROUND_GAME_COMMENCE,
|
||||
ROUND_GAME_RESTART,
|
||||
ROUND_GAME_OVER
|
||||
};
|
||||
|
||||
enum RewardRules
|
||||
{
|
||||
RR_CTS_WIN,
|
||||
RR_TERRORISTS_WIN,
|
||||
RR_TARGET_BOMB,
|
||||
RR_VIP_ESCAPED,
|
||||
RR_VIP_ASSASSINATED,
|
||||
RR_TERRORISTS_ESCAPED,
|
||||
RR_CTS_PREVENT_ESCAPE,
|
||||
RR_ESCAPING_TERRORISTS_NEUTRALIZED,
|
||||
RR_BOMB_DEFUSED,
|
||||
RR_BOMB_PLANTED,
|
||||
RR_BOMB_EXPLODED,
|
||||
RR_ALL_HOSTAGES_RESCUED,
|
||||
RR_TARGET_BOMB_SAVED,
|
||||
RR_HOSTAGE_NOT_RESCUED,
|
||||
RR_VIP_NOT_ESCAPED,
|
||||
RR_LOSER_BONUS_DEFAULT,
|
||||
RR_LOSER_BONUS_MIN,
|
||||
RR_LOSER_BONUS_MAX,
|
||||
RR_LOSER_BONUS_ADD,
|
||||
RR_RESCUED_HOSTAGE,
|
||||
RR_TOOK_HOSTAGE_ACC,
|
||||
RR_TOOK_HOSTAGE,
|
||||
RR_END
|
||||
};
|
||||
|
||||
// custom enum
|
||||
enum RewardAccount
|
||||
{
|
||||
REWARD_TARGET_BOMB = 3500,
|
||||
REWARD_VIP_ESCAPED = 3500,
|
||||
REWARD_VIP_ASSASSINATED = 3250,
|
||||
REWARD_TERRORISTS_ESCAPED = 3150,
|
||||
REWARD_CTS_PREVENT_ESCAPE = 3500,
|
||||
REWARD_ESCAPING_TERRORISTS_NEUTRALIZED = 3250,
|
||||
REWARD_BOMB_DEFUSED = 3250,
|
||||
REWARD_BOMB_PLANTED = 800,
|
||||
REWARD_BOMB_EXPLODED = 3250,
|
||||
REWARD_CTS_WIN = 3000,
|
||||
REWARD_TERRORISTS_WIN = 3000,
|
||||
REWARD_ALL_HOSTAGES_RESCUED = 2500,
|
||||
|
||||
// the end round was by the expiration time
|
||||
REWARD_TARGET_BOMB_SAVED = 3250,
|
||||
REWARD_HOSTAGE_NOT_RESCUED = 3250,
|
||||
REWARD_VIP_NOT_ESCAPED = 3250,
|
||||
|
||||
// loser bonus
|
||||
REWARD_LOSER_BONUS_DEFAULT = 1400,
|
||||
REWARD_LOSER_BONUS_MIN = 1500,
|
||||
REWARD_LOSER_BONUS_MAX = 3000,
|
||||
REWARD_LOSER_BONUS_ADD = 500,
|
||||
|
||||
REWARD_RESCUED_HOSTAGE = 750,
|
||||
REWARD_KILLED_ENEMY = 300,
|
||||
REWARD_KILLED_VIP = 2500,
|
||||
REWARD_VIP_HAVE_SELF_RESCUED = 2500,
|
||||
|
||||
REWARD_TAKEN_HOSTAGE = 1000,
|
||||
REWARD_TOOK_HOSTAGE_ACC = 100,
|
||||
REWARD_TOOK_HOSTAGE = 150,
|
||||
};
|
||||
|
||||
// custom enum
|
||||
enum PaybackForBadThing
|
||||
{
|
||||
PAYBACK_FOR_KILLED_TEAMMATES = -3300,
|
||||
};
|
||||
|
||||
// custom enum
|
||||
enum InfoMapBuyParam
|
||||
{
|
||||
BUYING_EVERYONE = 0,
|
||||
BUYING_ONLY_CTS,
|
||||
BUYING_ONLY_TERRORISTS,
|
||||
BUYING_NO_ONE,
|
||||
};
|
||||
|
||||
// weapon respawning return codes
|
||||
enum
|
||||
{
|
||||
GR_NONE = 0,
|
||||
|
||||
GR_WEAPON_RESPAWN_YES,
|
||||
GR_WEAPON_RESPAWN_NO,
|
||||
|
||||
GR_AMMO_RESPAWN_YES,
|
||||
GR_AMMO_RESPAWN_NO,
|
||||
|
||||
GR_ITEM_RESPAWN_YES,
|
||||
GR_ITEM_RESPAWN_NO,
|
||||
|
||||
GR_PLR_DROP_GUN_ALL,
|
||||
GR_PLR_DROP_GUN_ACTIVE,
|
||||
GR_PLR_DROP_GUN_NO,
|
||||
|
||||
GR_PLR_DROP_AMMO_ALL,
|
||||
GR_PLR_DROP_AMMO_ACTIVE,
|
||||
GR_PLR_DROP_AMMO_NO,
|
||||
};
|
||||
|
||||
// custom enum
|
||||
enum
|
||||
{
|
||||
SCENARIO_BLOCK_TIME_EXPRIRED = (1 << 0), // flag "a"
|
||||
SCENARIO_BLOCK_NEED_PLAYERS = (1 << 1), // flag "b"
|
||||
SCENARIO_BLOCK_VIP_ESCAPE = (1 << 2), // flag "c"
|
||||
SCENARIO_BLOCK_PRISON_ESCAPE = (1 << 3), // flag "d"
|
||||
SCENARIO_BLOCK_BOMB = (1 << 4), // flag "e"
|
||||
SCENARIO_BLOCK_TEAM_EXTERMINATION = (1 << 5), // flag "f"
|
||||
SCENARIO_BLOCK_HOSTAGE_RESCUE = (1 << 6), // flag "g"
|
||||
};
|
||||
|
||||
// Player relationship return codes
|
||||
enum
|
||||
{
|
||||
GR_NOTTEAMMATE = 0,
|
||||
GR_TEAMMATE,
|
||||
GR_ENEMY,
|
||||
GR_ALLY,
|
||||
GR_NEUTRAL,
|
||||
};
|
||||
|
||||
enum WeaponIdType
|
||||
{
|
||||
WEAPON_NONE,
|
||||
WEAPON_P228,
|
||||
WEAPON_GLOCK,
|
||||
WEAPON_SCOUT,
|
||||
WEAPON_HEGRENADE,
|
||||
WEAPON_XM1014,
|
||||
WEAPON_C4,
|
||||
WEAPON_MAC10,
|
||||
WEAPON_AUG,
|
||||
WEAPON_SMOKEGRENADE,
|
||||
WEAPON_ELITE,
|
||||
WEAPON_FIVESEVEN,
|
||||
WEAPON_UMP45,
|
||||
WEAPON_SG550,
|
||||
WEAPON_GALIL,
|
||||
WEAPON_FAMAS,
|
||||
WEAPON_USP,
|
||||
WEAPON_GLOCK18,
|
||||
WEAPON_AWP,
|
||||
WEAPON_MP5N,
|
||||
WEAPON_M249,
|
||||
WEAPON_M3,
|
||||
WEAPON_M4A1,
|
||||
WEAPON_TMP,
|
||||
WEAPON_G3SG1,
|
||||
WEAPON_FLASHBANG,
|
||||
WEAPON_DEAGLE,
|
||||
WEAPON_SG552,
|
||||
WEAPON_AK47,
|
||||
WEAPON_KNIFE,
|
||||
WEAPON_P90,
|
||||
WEAPON_SHIELDGUN = 99
|
||||
};
|
||||
|
||||
enum AutoBuyClassType
|
||||
{
|
||||
AUTOBUYCLASS_NONE = 0,
|
||||
AUTOBUYCLASS_PRIMARY = (1 << 0),
|
||||
AUTOBUYCLASS_SECONDARY = (1 << 1),
|
||||
AUTOBUYCLASS_AMMO = (1 << 2),
|
||||
AUTOBUYCLASS_ARMOR = (1 << 3),
|
||||
AUTOBUYCLASS_DEFUSER = (1 << 4),
|
||||
AUTOBUYCLASS_PISTOL = (1 << 5),
|
||||
AUTOBUYCLASS_SMG = (1 << 6),
|
||||
AUTOBUYCLASS_RIFLE = (1 << 7),
|
||||
AUTOBUYCLASS_SNIPERRIFLE = (1 << 8),
|
||||
AUTOBUYCLASS_SHOTGUN = (1 << 9),
|
||||
AUTOBUYCLASS_MACHINEGUN = (1 << 10),
|
||||
AUTOBUYCLASS_GRENADE = (1 << 11),
|
||||
AUTOBUYCLASS_NIGHTVISION = (1 << 12),
|
||||
AUTOBUYCLASS_SHIELD = (1 << 13),
|
||||
};
|
||||
|
||||
enum AmmoCostType
|
||||
{
|
||||
AMMO_338MAG_PRICE = 125,
|
||||
AMMO_357SIG_PRICE = 50,
|
||||
AMMO_45ACP_PRICE = 25,
|
||||
AMMO_50AE_PRICE = 40,
|
||||
AMMO_556MM_PRICE = 60,
|
||||
AMMO_57MM_PRICE = 50,
|
||||
AMMO_762MM_PRICE = 80,
|
||||
AMMO_9MM_PRICE = 20,
|
||||
AMMO_BUCKSHOT_PRICE = 65,
|
||||
};
|
||||
|
||||
// custom enum
|
||||
// the default amount of ammo that comes with each gun when it spawns
|
||||
enum ClipGiveDefault
|
||||
{
|
||||
P228_DEFAULT_GIVE = 13,
|
||||
GLOCK18_DEFAULT_GIVE = 20,
|
||||
SCOUT_DEFAULT_GIVE = 10,
|
||||
HEGRENADE_DEFAULT_GIVE = 1,
|
||||
XM1014_DEFAULT_GIVE = 7,
|
||||
C4_DEFAULT_GIVE = 1,
|
||||
MAC10_DEFAULT_GIVE = 30,
|
||||
AUG_DEFAULT_GIVE = 30,
|
||||
SMOKEGRENADE_DEFAULT_GIVE = 1,
|
||||
ELITE_DEFAULT_GIVE = 30,
|
||||
FIVESEVEN_DEFAULT_GIVE = 20,
|
||||
UMP45_DEFAULT_GIVE = 25,
|
||||
SG550_DEFAULT_GIVE = 30,
|
||||
GALIL_DEFAULT_GIVE = 35,
|
||||
FAMAS_DEFAULT_GIVE = 25,
|
||||
USP_DEFAULT_GIVE = 12,
|
||||
AWP_DEFAULT_GIVE = 10,
|
||||
MP5NAVY_DEFAULT_GIVE = 30,
|
||||
M249_DEFAULT_GIVE = 100,
|
||||
M3_DEFAULT_GIVE = 8,
|
||||
M4A1_DEFAULT_GIVE = 30,
|
||||
TMP_DEFAULT_GIVE = 30,
|
||||
G3SG1_DEFAULT_GIVE = 20,
|
||||
FLASHBANG_DEFAULT_GIVE = 1,
|
||||
DEAGLE_DEFAULT_GIVE = 7,
|
||||
SG552_DEFAULT_GIVE = 30,
|
||||
AK47_DEFAULT_GIVE = 30,
|
||||
/*KNIFE_DEFAULT_GIVE = 1,*/
|
||||
P90_DEFAULT_GIVE = 50,
|
||||
};
|
||||
|
||||
enum ClipSizeType
|
||||
{
|
||||
P228_MAX_CLIP = 13,
|
||||
GLOCK18_MAX_CLIP = 20,
|
||||
SCOUT_MAX_CLIP = 10,
|
||||
XM1014_MAX_CLIP = 7,
|
||||
MAC10_MAX_CLIP = 30,
|
||||
AUG_MAX_CLIP = 30,
|
||||
ELITE_MAX_CLIP = 30,
|
||||
FIVESEVEN_MAX_CLIP = 20,
|
||||
UMP45_MAX_CLIP = 25,
|
||||
SG550_MAX_CLIP = 30,
|
||||
GALIL_MAX_CLIP = 35,
|
||||
FAMAS_MAX_CLIP = 25,
|
||||
USP_MAX_CLIP = 12,
|
||||
AWP_MAX_CLIP = 10,
|
||||
MP5N_MAX_CLIP = 30,
|
||||
M249_MAX_CLIP = 100,
|
||||
M3_MAX_CLIP = 8,
|
||||
M4A1_MAX_CLIP = 30,
|
||||
TMP_MAX_CLIP = 30,
|
||||
G3SG1_MAX_CLIP = 20,
|
||||
DEAGLE_MAX_CLIP = 7,
|
||||
SG552_MAX_CLIP = 30,
|
||||
AK47_MAX_CLIP = 30,
|
||||
P90_MAX_CLIP = 50,
|
||||
};
|
||||
|
||||
enum WeightWeapon
|
||||
{
|
||||
P228_WEIGHT = 5,
|
||||
GLOCK18_WEIGHT = 5,
|
||||
SCOUT_WEIGHT = 30,
|
||||
HEGRENADE_WEIGHT = 2,
|
||||
XM1014_WEIGHT = 20,
|
||||
C4_WEIGHT = 3,
|
||||
MAC10_WEIGHT = 25,
|
||||
AUG_WEIGHT = 25,
|
||||
SMOKEGRENADE_WEIGHT = 1,
|
||||
ELITE_WEIGHT = 5,
|
||||
FIVESEVEN_WEIGHT = 5,
|
||||
UMP45_WEIGHT = 25,
|
||||
SG550_WEIGHT = 20,
|
||||
GALIL_WEIGHT = 25,
|
||||
FAMAS_WEIGHT = 75,
|
||||
USP_WEIGHT = 5,
|
||||
AWP_WEIGHT = 30,
|
||||
MP5NAVY_WEIGHT = 25,
|
||||
M249_WEIGHT = 25,
|
||||
M3_WEIGHT = 20,
|
||||
M4A1_WEIGHT = 25,
|
||||
TMP_WEIGHT = 25,
|
||||
G3SG1_WEIGHT = 20,
|
||||
FLASHBANG_WEIGHT = 1,
|
||||
DEAGLE_WEIGHT = 7,
|
||||
SG552_WEIGHT = 25,
|
||||
AK47_WEIGHT = 25,
|
||||
P90_WEIGHT = 26,
|
||||
KNIFE_WEIGHT = 0,
|
||||
};
|
||||
|
||||
enum MaxAmmoType
|
||||
{
|
||||
MAX_AMMO_BUCKSHOT = 32,
|
||||
MAX_AMMO_9MM = 120,
|
||||
MAX_AMMO_556NATO = 90,
|
||||
MAX_AMMO_556NATOBOX = 200,
|
||||
MAX_AMMO_762NATO = 90,
|
||||
MAX_AMMO_45ACP = 100,
|
||||
MAX_AMMO_50AE = 35,
|
||||
MAX_AMMO_338MAGNUM = 30,
|
||||
MAX_AMMO_57MM = 100,
|
||||
MAX_AMMO_357SIG = 52,
|
||||
|
||||
// custom
|
||||
MAX_AMMO_SMOKEGRENADE = 1,
|
||||
MAX_AMMO_HEGRENADE = 1,
|
||||
MAX_AMMO_FLASHBANG = 2,
|
||||
};
|
||||
|
||||
enum AmmoType
|
||||
{
|
||||
AMMO_NONE,
|
||||
AMMO_338MAGNUM,
|
||||
AMMO_762NATO,
|
||||
AMMO_556NATOBOX,
|
||||
AMMO_556NATO,
|
||||
AMMO_BUCKSHOT,
|
||||
AMMO_45ACP,
|
||||
AMMO_57MM,
|
||||
AMMO_50AE,
|
||||
AMMO_357SIG,
|
||||
AMMO_9MM,
|
||||
AMMO_FLASHBANG,
|
||||
AMMO_HEGRENADE,
|
||||
AMMO_SMOKEGRENADE,
|
||||
AMMO_C4,
|
||||
|
||||
AMMO_MAX_TYPES
|
||||
};
|
||||
|
||||
enum WeaponClassType
|
||||
{
|
||||
WEAPONCLASS_NONE,
|
||||
WEAPONCLASS_KNIFE,
|
||||
WEAPONCLASS_PISTOL,
|
||||
WEAPONCLASS_GRENADE,
|
||||
WEAPONCLASS_SUBMACHINEGUN,
|
||||
WEAPONCLASS_SHOTGUN,
|
||||
WEAPONCLASS_MACHINEGUN,
|
||||
WEAPONCLASS_RIFLE,
|
||||
WEAPONCLASS_SNIPERRIFLE,
|
||||
WEAPONCLASS_MAX,
|
||||
};
|
||||
|
||||
enum AmmoBuyAmount
|
||||
{
|
||||
AMMO_338MAG_BUY = 10,
|
||||
AMMO_357SIG_BUY = 13,
|
||||
AMMO_45ACP_BUY = 12,
|
||||
AMMO_50AE_BUY = 7,
|
||||
AMMO_556NATO_BUY = 30,
|
||||
AMMO_556NATOBOX_BUY = 30,
|
||||
AMMO_57MM_BUY = 50,
|
||||
AMMO_762NATO_BUY = 30,
|
||||
AMMO_9MM_BUY = 30,
|
||||
AMMO_BUCKSHOT_BUY = 8,
|
||||
};
|
||||
|
||||
enum shieldgun_e
|
||||
{
|
||||
SHIELDGUN_IDLE,
|
||||
SHIELDGUN_SHOOT1,
|
||||
SHIELDGUN_SHOOT2,
|
||||
SHIELDGUN_SHOOT_EMPTY,
|
||||
SHIELDGUN_RELOAD,
|
||||
SHIELDGUN_DRAW,
|
||||
SHIELDGUN_DRAWN_IDLE,
|
||||
SHIELDGUN_UP,
|
||||
SHIELDGUN_DOWN,
|
||||
};
|
||||
|
||||
// custom
|
||||
enum shieldgren_e
|
||||
{
|
||||
SHIELDREN_IDLE = 4,
|
||||
SHIELDREN_UP,
|
||||
SHIELDREN_DOWN
|
||||
};
|
||||
|
||||
enum InventorySlotType
|
||||
{
|
||||
NONE_SLOT,
|
||||
PRIMARY_WEAPON_SLOT,
|
||||
PISTOL_SLOT,
|
||||
KNIFE_SLOT,
|
||||
GRENADE_SLOT,
|
||||
C4_SLOT,
|
||||
};
|
||||
|
||||
enum Bullet
|
||||
{
|
||||
BULLET_NONE,
|
||||
BULLET_PLAYER_9MM,
|
||||
BULLET_PLAYER_MP5,
|
||||
BULLET_PLAYER_357,
|
||||
BULLET_PLAYER_BUCKSHOT,
|
||||
BULLET_PLAYER_CROWBAR,
|
||||
BULLET_MONSTER_9MM,
|
||||
BULLET_MONSTER_MP5,
|
||||
BULLET_MONSTER_12MM,
|
||||
BULLET_PLAYER_45ACP,
|
||||
BULLET_PLAYER_338MAG,
|
||||
BULLET_PLAYER_762MM,
|
||||
BULLET_PLAYER_556MM,
|
||||
BULLET_PLAYER_50AE,
|
||||
BULLET_PLAYER_57MM,
|
||||
BULLET_PLAYER_357SIG,
|
||||
};
|
||||
|
||||
struct WeaponStruct
|
||||
{
|
||||
int m_type;
|
||||
int m_price;
|
||||
int m_side;
|
||||
int m_slot;
|
||||
int m_ammoPrice;
|
||||
};
|
||||
|
||||
struct AutoBuyInfoStruct
|
||||
{
|
||||
AutoBuyClassType m_class;
|
||||
char *m_command;
|
||||
char *m_classname;
|
||||
};
|
||||
|
||||
struct WeaponAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponIdType id;
|
||||
};
|
||||
|
||||
struct WeaponBuyAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponIdType id;
|
||||
char *failName;
|
||||
};
|
||||
|
||||
struct WeaponClassAliasInfo
|
||||
{
|
||||
char *alias;
|
||||
WeaponClassType id;
|
||||
};
|
||||
|
||||
struct WeaponSlotInfo
|
||||
{
|
||||
WeaponIdType id;
|
||||
InventorySlotType slot;
|
||||
const char *weaponName;
|
||||
};
|
||||
|
||||
enum hash_types_e { CLASSNAME };
|
@ -1,303 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "regamedll_const.h"
|
||||
|
||||
class CBaseEntity;
|
||||
class CBasePlayer;
|
||||
|
||||
// Implementation wrapper
|
||||
class CCSEntity {
|
||||
public:
|
||||
virtual ~CCSEntity() {}
|
||||
virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker);
|
||||
virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand);
|
||||
public:
|
||||
CBaseEntity *m_pContainingEntity;
|
||||
};
|
||||
|
||||
class CCSDelay: public CCSEntity {};
|
||||
class CCSAnimating: public CCSDelay {};
|
||||
class CCSPlayerItem: public CCSAnimating {};
|
||||
class CCSToggle: public CCSAnimating {};
|
||||
class CCSMonster: public CCSToggle {};
|
||||
class CCSWeaponBox: public CCSEntity {};
|
||||
class CCSArmoury: public CCSEntity {};
|
||||
|
||||
class CCSPlayer: public CCSMonster {
|
||||
public:
|
||||
CCSPlayer() : m_bForceShowMenu(false)
|
||||
{
|
||||
m_szModel[0] = '\0';
|
||||
}
|
||||
|
||||
virtual bool IsConnected() const;
|
||||
virtual void SetAnimation(PLAYER_ANIM playerAnim);
|
||||
virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true);
|
||||
virtual CBaseEntity *GiveNamedItem(const char *pszName);
|
||||
virtual CBaseEntity *GiveNamedItemEx(const char *pszName);
|
||||
virtual void GiveDefaultItems();
|
||||
virtual void GiveShield(bool bDeploy = true);
|
||||
virtual void DropShield(bool bDeploy = true);
|
||||
virtual void DropPlayerItem(const char *pszItemName);
|
||||
virtual void RemoveShield();
|
||||
virtual void RemoveAllItems(bool bRemoveSuit);
|
||||
virtual bool RemovePlayerItem(const char* pszItemName);
|
||||
virtual void SetPlayerModel(bool bHasC4);
|
||||
virtual void SetPlayerModelEx(const char *modelName);
|
||||
virtual void SetNewPlayerModel(const char *modelName);
|
||||
virtual void ClientCommand(const char *cmd, const char *arg1 = nullptr, const char *arg2 = nullptr, const char *arg3 = nullptr);
|
||||
virtual void SetProgressBarTime(int time);
|
||||
virtual void SetProgressBarTime2(int time, float timeElapsed);
|
||||
virtual struct edict_s *EntSelectSpawnPoint();
|
||||
virtual void SetBombIcon(bool bFlash = false);
|
||||
virtual void SetScoreAttrib(CBasePlayer *dest);
|
||||
virtual void SendItemStatus();
|
||||
virtual void ReloadWeapons(CBasePlayerItem *pWeapon = nullptr, bool bForceReload = false, bool bForceRefill = false);
|
||||
virtual void Observer_SetMode(int iMode);
|
||||
virtual bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot);
|
||||
virtual bool SwitchWeapon(CBasePlayerItem *pWeapon);
|
||||
virtual void SwitchTeam();
|
||||
virtual bool JoinTeam(TeamName team);
|
||||
virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle);
|
||||
virtual void TeamChangeUpdate();
|
||||
virtual void DropSecondary();
|
||||
virtual void DropPrimary();
|
||||
virtual bool HasPlayerItem(CBasePlayerItem *pCheckItem);
|
||||
virtual bool HasNamedPlayerItem(const char *pszItemName);
|
||||
virtual CBasePlayerItem *GetItemById(WeaponIdType weaponID);
|
||||
virtual CBasePlayerItem *GetItemByName(const char *itemName);
|
||||
virtual void Disappear();
|
||||
virtual void MakeVIP();
|
||||
virtual bool MakeBomber();
|
||||
|
||||
CBasePlayer *BasePlayer() const;
|
||||
public:
|
||||
char m_szModel[32];
|
||||
bool m_bForceShowMenu;
|
||||
};
|
||||
|
||||
class CAPI_Bot: public CCSPlayer {};
|
||||
class CAPI_CSBot: public CAPI_Bot {};
|
||||
class CCSShield: public CCSEntity {};
|
||||
class CCSDeadHEV: public CCSMonster {};
|
||||
class CCSSprayCan: public CCSEntity {};
|
||||
class CCSBloodSplat: public CCSEntity {};
|
||||
class CCSPlayerWeapon: public CCSPlayerItem {};
|
||||
class CCSWorld: public CCSEntity {};
|
||||
class CCSDecal: public CCSEntity {};
|
||||
class CCSCorpse: public CCSEntity {};
|
||||
class CCSGrenade: public CCSMonster {};
|
||||
class CCSAirtank: public CCSGrenade {};
|
||||
class CCSPlayerAmmo: public CCSEntity {};
|
||||
class CCS9MMAmmo: public CCSPlayerAmmo {};
|
||||
class CCSBuckShotAmmo: public CCSPlayerAmmo {};
|
||||
class CCS556NatoAmmo: public CCSPlayerAmmo {};
|
||||
class CCS556NatoBoxAmmo: public CCSPlayerAmmo {};
|
||||
class CCS762NatoAmmo: public CCSPlayerAmmo {};
|
||||
class CCS45ACPAmmo: public CCSPlayerAmmo {};
|
||||
class CCS50AEAmmo: public CCSPlayerAmmo {};
|
||||
class CCS338MagnumAmmo: public CCSPlayerAmmo {};
|
||||
class CCS57MMAmmo: public CCSPlayerAmmo {};
|
||||
class CCS357SIGAmmo: public CCSPlayerAmmo {};
|
||||
class CCSFuncWall: public CCSEntity {};
|
||||
class CCSFuncWallToggle: public CCSFuncWall {};
|
||||
class CCSFuncConveyor: public CCSFuncWall {};
|
||||
class CCSFuncIllusionary: public CCSToggle {};
|
||||
class CCSFuncMonsterClip: public CCSFuncWall {};
|
||||
class CCSFuncRotating: public CCSEntity {};
|
||||
class CCSPendulum: public CCSEntity {};
|
||||
class CCSPointEntity: public CCSEntity {};
|
||||
class CCSStripWeapons: public CCSPointEntity {};
|
||||
class CCSInfoIntermission: public CCSPointEntity {};
|
||||
class CCSRevertSaved: public CCSPointEntity {};
|
||||
class CCSEnvGlobal: public CCSPointEntity {};
|
||||
class CCSMultiSource: public CCSPointEntity {};
|
||||
class CCSButton: public CCSToggle {};
|
||||
class CCSRotButton: public CCSButton {};
|
||||
class CCSMomentaryRotButton: public CCSToggle {};
|
||||
class CCSEnvSpark: public CCSEntity {};
|
||||
class CCSButtonTarget: public CCSEntity {};
|
||||
class CCSDoor: public CCSToggle {};
|
||||
class CCSRotDoor: public CCSDoor {};
|
||||
class CCSMomentaryDoor: public CCSToggle {};
|
||||
class CCSGib: public CCSEntity {};
|
||||
class CCSBubbling: public CCSEntity {};
|
||||
class CCSBeam: public CCSEntity {};
|
||||
class CCSLightning: public CCSBeam {};
|
||||
class CCSLaser: public CCSBeam {};
|
||||
class CCSGlow: public CCSPointEntity {};
|
||||
class CCSSprite: public CCSPointEntity {};
|
||||
class CCSBombGlow: public CCSSprite {};
|
||||
class CCSGibShooter: public CCSDelay {};
|
||||
class CCSEnvShooter: public CCSGibShooter {};
|
||||
class CCSTestEffect: public CCSDelay {};
|
||||
class CCSBlood: public CCSPointEntity {};
|
||||
class CCSShake: public CCSPointEntity {};
|
||||
class CCSFade: public CCSPointEntity {};
|
||||
class CCSMessage: public CCSPointEntity {};
|
||||
class CCSEnvFunnel: public CCSDelay {};
|
||||
class CCSEnvBeverage: public CCSDelay {};
|
||||
class CCSItemSoda: public CCSEntity {};
|
||||
class CCSShower: public CCSEntity {};
|
||||
class CCSEnvExplosion: public CCSMonster {};
|
||||
class CCSBreakable: public CCSDelay {};
|
||||
class CCSPushable: public CCSBreakable {};
|
||||
class CCSFuncTank: public CCSEntity {};
|
||||
class CCSFuncTankGun: public CCSFuncTank {};
|
||||
class CCSFuncTankLaser: public CCSFuncTank {};
|
||||
class CCSFuncTankRocket: public CCSFuncTank {};
|
||||
class CCSFuncTankMortar: public CCSFuncTank {};
|
||||
class CCSFuncTankControls: public CCSEntity {};
|
||||
class CCSRecharge: public CCSToggle {};
|
||||
class CCSCycler: public CCSMonster {};
|
||||
class CCSGenericCycler: public CCSCycler {};
|
||||
class CCSCyclerProbe: public CCSCycler {};
|
||||
class CCSCyclerSprite: public CCSEntity {};
|
||||
class CCSWeaponCycler: public CCSPlayerWeapon {};
|
||||
class CCSWreckage: public CCSMonster {};
|
||||
class CCSWorldItem: public CCSEntity {};
|
||||
class CCSItem: public CCSEntity {};
|
||||
class CCSHealthKit: public CCSItem {};
|
||||
class CCSWallHealth: public CCSToggle {};
|
||||
class CCSItemSuit: public CCSItem {};
|
||||
class CCSItemBattery: public CCSItem {};
|
||||
class CCSItemAntidote: public CCSItem {};
|
||||
class CCSItemSecurity: public CCSItem {};
|
||||
class CCSItemLongJump: public CCSItem {};
|
||||
class CCSItemKevlar: public CCSItem {};
|
||||
class CCSItemAssaultSuit: public CCSItem {};
|
||||
class CCSItemThighPack: public CCSItem {};
|
||||
class CCSGrenCatch: public CCSEntity {};
|
||||
class CCSFuncWeaponCheck: public CCSEntity {};
|
||||
class CCSHostage: public CCSMonster {};
|
||||
class CCSLight: public CCSPointEntity {};
|
||||
class CCSEnvLight: public CCSLight {};
|
||||
class CCSRuleEntity: public CCSEntity {};
|
||||
class CCSRulePointEntity: public CCSRuleEntity {};
|
||||
class CCSRuleBrushEntity: public CCSRuleEntity {};
|
||||
class CCSGameScore: public CCSRulePointEntity {};
|
||||
class CCSGameEnd: public CCSRulePointEntity {};
|
||||
class CCSGameText: public CCSRulePointEntity {};
|
||||
class CCSGameTeamMaster: public CCSRulePointEntity {};
|
||||
class CCSGameTeamSet: public CCSRulePointEntity {};
|
||||
class CCSGamePlayerZone: public CCSRuleBrushEntity {};
|
||||
class CCSGamePlayerHurt: public CCSRulePointEntity {};
|
||||
class CCSGameCounter: public CCSRulePointEntity {};
|
||||
class CCSGameCounterSet: public CCSRulePointEntity {};
|
||||
class CCSGamePlayerEquip: public CCSRulePointEntity {};
|
||||
class CCSGamePlayerTeam: public CCSRulePointEntity {};
|
||||
class CCSFuncMortarField: public CCSToggle {};
|
||||
class CCSMortar: public CCSGrenade {};
|
||||
class CCSMapInfo: public CCSPointEntity {};
|
||||
class CCSPathCorner: public CCSPointEntity {};
|
||||
class CCSPathTrack: public CCSPointEntity {};
|
||||
class CCSFuncTrackTrain: public CCSEntity {};
|
||||
class CCSFuncVehicleControls: public CCSEntity {};
|
||||
class CCSFuncVehicle: public CCSEntity {};
|
||||
class CCSPlatTrain: public CCSToggle {};
|
||||
class CCSFuncPlat: public CCSPlatTrain {};
|
||||
class CCSPlatTrigger: public CCSEntity {};
|
||||
class CCSFuncPlatRot: public CCSFuncPlat {};
|
||||
class CCSFuncTrain: public CCSPlatTrain {};
|
||||
class CCSFuncTrainControls: public CCSEntity {};
|
||||
class CCSFuncTrackChange: public CCSFuncPlatRot {};
|
||||
class CCSFuncTrackAuto: public CCSFuncTrackChange {};
|
||||
class CCSGunTarget: public CCSMonster {};
|
||||
class CCSAmbientGeneric: public CCSEntity {};
|
||||
class CCSEnvSound: public CCSPointEntity {};
|
||||
class CCSSpeaker: public CCSEntity {};
|
||||
class CCSSoundEnt: public CCSEntity {};
|
||||
class CCSUSP: public CCSPlayerWeapon {};
|
||||
class CCSMP5N: public CCSPlayerWeapon {};
|
||||
class CCSSG552: public CCSPlayerWeapon {};
|
||||
class CCSAK47: public CCSPlayerWeapon {};
|
||||
class CCSAUG: public CCSPlayerWeapon {};
|
||||
class CCSAWP: public CCSPlayerWeapon {};
|
||||
class CCSC4: public CCSPlayerWeapon {};
|
||||
class CCSDEAGLE: public CCSPlayerWeapon {};
|
||||
class CCSFlashbang: public CCSPlayerWeapon {};
|
||||
class CCSG3SG1: public CCSPlayerWeapon {};
|
||||
class CCSGLOCK18: public CCSPlayerWeapon {};
|
||||
class CCSHEGrenade: public CCSPlayerWeapon {};
|
||||
class CCSKnife: public CCSPlayerWeapon {};
|
||||
class CCSM249: public CCSPlayerWeapon {};
|
||||
class CCSM3: public CCSPlayerWeapon {};
|
||||
class CCSM4A1: public CCSPlayerWeapon {};
|
||||
class CCSMAC10: public CCSPlayerWeapon {};
|
||||
class CCSP228: public CCSPlayerWeapon {};
|
||||
class CCSP90: public CCSPlayerWeapon {};
|
||||
class CCSSCOUT: public CCSPlayerWeapon {};
|
||||
class CCSSmokeGrenade: public CCSPlayerWeapon {};
|
||||
class CCSTMP: public CCSPlayerWeapon {};
|
||||
class CCSXM1014: public CCSPlayerWeapon {};
|
||||
class CCSELITE: public CCSPlayerWeapon {};
|
||||
class CCSFiveSeven: public CCSPlayerWeapon {};
|
||||
class CCSUMP45: public CCSPlayerWeapon {};
|
||||
class CCSSG550: public CCSPlayerWeapon {};
|
||||
class CCSGalil: public CCSPlayerWeapon {};
|
||||
class CCSFamas: public CCSPlayerWeapon {};
|
||||
class CCSNullEntity: public CCSEntity {};
|
||||
class CCSDMStart: public CCSPointEntity {};
|
||||
class CCSFrictionModifier: public CCSEntity {};
|
||||
class CCSAutoTrigger: public CCSDelay {};
|
||||
class CCSTriggerRelay: public CCSDelay {};
|
||||
class CCSMultiManager: public CCSToggle {};
|
||||
class CCSRenderFxManager: public CCSEntity {};
|
||||
class CCSTrigger: public CCSToggle {};
|
||||
class CCSTriggerHurt: public CCSTrigger {};
|
||||
class CCSTriggerMonsterJump: public CCSTrigger {};
|
||||
class CCSTriggerCDAudio: public CCSTrigger {};
|
||||
class CCSTargetCDAudio: public CCSPointEntity {};
|
||||
class CCSTriggerMultiple: public CCSTrigger {};
|
||||
class CCSTriggerOnce: public CCSTriggerMultiple {};
|
||||
class CCSTriggerCounter: public CCSTrigger {};
|
||||
class CCSTriggerVolume: public CCSPointEntity {};
|
||||
class CCSFireAndDie: public CCSDelay {};
|
||||
class CCSChangeLevel: public CCSTrigger {};
|
||||
class CCSLadder: public CCSTrigger {};
|
||||
class CCSTriggerPush: public CCSTrigger {};
|
||||
class CCSTriggerTeleport: public CCSTrigger {};
|
||||
class CCSBuyZone: public CCSTrigger {};
|
||||
class CCSBombTarget: public CCSTrigger {};
|
||||
class CCSHostageRescue: public CCSTrigger {};
|
||||
class CCSEscapeZone: public CCSTrigger {};
|
||||
class CCSVIP_SafetyZone: public CCSTrigger {};
|
||||
class CCSTriggerSave: public CCSTrigger {};
|
||||
class CCSTriggerEndSection: public CCSTrigger {};
|
||||
class CCSTriggerGravity: public CCSTrigger {};
|
||||
class CCSTriggerChangeTarget: public CCSDelay {};
|
||||
class CCSTriggerCamera: public CCSDelay {};
|
||||
class CCSWeather: public CCSTrigger {};
|
||||
class CCSClientFog: public CCSEntity {};
|
||||
|
||||
inline CBasePlayer *CCSPlayer::BasePlayer() const {
|
||||
return reinterpret_cast<CBasePlayer *>(this->m_pContainingEntity);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <archtypes.h>
|
||||
|
||||
class IRehldsFlightRecorder
|
||||
{
|
||||
public:
|
||||
virtual ~IRehldsFlightRecorder() { }
|
||||
|
||||
virtual uint16 RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut) = 0;
|
||||
|
||||
virtual void StartMessage(uint16 msg, bool entrance) = 0;
|
||||
virtual void EndMessage(uint16 msg, bool entrance) = 0;
|
||||
|
||||
virtual void WriteInt8(int8 v) = 0;
|
||||
virtual void WriteUInt8(uint8 v) = 0;
|
||||
|
||||
virtual void WriteInt16(int16 v) = 0;
|
||||
virtual void WriteUInt16(uint16 v) = 0;
|
||||
|
||||
virtual void WriteInt32(int32 v) = 0;
|
||||
virtual void WriteUInt32(uint32 v) = 0;
|
||||
|
||||
virtual void WriteInt64(int64 v) = 0;
|
||||
virtual void WriteUInt64(uint64 v) = 0;
|
||||
|
||||
virtual void WriteFloat(float v) = 0;
|
||||
virtual void WriteDouble(double v) = 0;
|
||||
|
||||
virtual void WriteString(const char* s) = 0;
|
||||
|
||||
virtual void WriteBuffer(const void* data ,unsigned int len) = 0;
|
||||
|
||||
};
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
typedef void(*xcommand_t)(void);
|
||||
typedef struct cmd_function_s
|
||||
{
|
||||
struct cmd_function_s *next;
|
||||
char *name;
|
||||
xcommand_t function;
|
||||
int flags;
|
||||
} cmd_function_t;
|
||||
|
||||
typedef enum cmd_source_s
|
||||
{
|
||||
src_client = 0, // came in over a net connection as a clc_stringcmd. host_client will be valid during this state.
|
||||
src_command = 1, // from the command buffer.
|
||||
} cmd_source_t;
|
||||
|
||||
#define FCMD_HUD_COMMAND BIT(0)
|
||||
#define FCMD_GAME_COMMAND BIT(1)
|
||||
#define FCMD_WRAPPER_COMMAND BIT(2)
|
@ -1,300 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <engine_strucs.h>
|
||||
#include <com_model.h>
|
||||
#include "cmd_rehlds.h"
|
||||
#include "rehlds_interfaces.h"
|
||||
#include "FlightRecorder.h"
|
||||
#include "../common/hookchains.h"
|
||||
|
||||
#define REHLDS_API_VERSION_MAJOR 3
|
||||
#define REHLDS_API_VERSION_MINOR 0
|
||||
|
||||
//Steam_NotifyClientConnect hook
|
||||
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
|
||||
typedef IHookChainRegistry<qboolean, IGameClient*, const void*, unsigned int> IRehldsHookRegistry_Steam_NotifyClientConnect;
|
||||
|
||||
//SV_ConnectClient hook
|
||||
typedef IVoidHookChain<> IRehldsHook_SV_ConnectClient;
|
||||
typedef IVoidHookChainRegistry<> IRehldsHookRegistry_SV_ConnectClient;
|
||||
|
||||
//SV_GetIDString hook
|
||||
typedef IHookChain<char*, USERID_t*> IRehldsHook_SV_GetIDString;
|
||||
typedef IHookChainRegistry<char*, USERID_t*> IRehldsHookRegistry_SV_GetIDString;
|
||||
|
||||
//SV_SendServerinfo hook
|
||||
typedef IVoidHookChain<sizebuf_t*, IGameClient*> IRehldsHook_SV_SendServerinfo;
|
||||
typedef IVoidHookChainRegistry<sizebuf_t*, IGameClient*> IRehldsHookRegistry_SV_SendServerinfo;
|
||||
|
||||
//SV_CheckProtocol hook
|
||||
typedef IHookChain<int, netadr_t*, int> IRehldsHook_SV_CheckProtocol;
|
||||
typedef IHookChainRegistry<int, netadr_t*, int> IRehldsHookRegistry_SV_CheckProtocol;
|
||||
|
||||
//SVC_GetChallenge_mod hook
|
||||
typedef IVoidHookChain<char*, int> IRehldsHook_SVC_GetChallenge_mod;
|
||||
typedef IVoidHookChainRegistry<char*, int> IRehldsHookRegistry_SVC_GetChallenge_mod;
|
||||
|
||||
//SV_CheckKeyInfo hook
|
||||
typedef IHookChain<int, netadr_t*, char*, uint16*, int*, char*, char*> IRehldsHook_SV_CheckKeyInfo;
|
||||
typedef IHookChainRegistry<int, netadr_t*, char*, uint16*, int*, char*, char*> IRehldsHookRegistry_SV_CheckKeyInfo;
|
||||
|
||||
//SV_CheckIPRestrictions hook
|
||||
typedef IHookChain<int, netadr_t*, int> IRehldsHook_SV_CheckIPRestrictions;
|
||||
typedef IHookChainRegistry<int, netadr_t*, int> IRehldsHookRegistry_SV_CheckIPRestrictions;
|
||||
|
||||
//SV_FinishCertificateCheck hook
|
||||
typedef IHookChain<int, netadr_t*, int, char*, char*> IRehldsHook_SV_FinishCertificateCheck;
|
||||
typedef IHookChainRegistry<int, netadr_t*, int, char*, char*> IRehldsHookRegistry_SV_FinishCertificateCheck;
|
||||
|
||||
//Steam_NotifyBotConnect hook
|
||||
typedef IHookChain<qboolean, IGameClient*> IRehldsHook_Steam_NotifyBotConnect;
|
||||
typedef IHookChainRegistry<qboolean, IGameClient*> IRehldsHookRegistry_Steam_NotifyBotConnect;
|
||||
|
||||
//SerializeSteamId
|
||||
typedef IVoidHookChain<USERID_t*, USERID_t*> IRehldsHook_SerializeSteamId;
|
||||
typedef IVoidHookChainRegistry<USERID_t*, USERID_t*> IRehldsHookRegistry_SerializeSteamId;
|
||||
|
||||
//SV_CompareUserID hook
|
||||
typedef IHookChain<qboolean, USERID_t*, USERID_t*> IRehldsHook_SV_CompareUserID;
|
||||
typedef IHookChainRegistry<qboolean, USERID_t*, USERID_t*> IRehldsHookRegistry_SV_CompareUserID;
|
||||
|
||||
//Steam_NotifyClientDisconnect
|
||||
typedef IVoidHookChain<IGameClient*> IRehldsHook_Steam_NotifyClientDisconnect;
|
||||
typedef IVoidHookChainRegistry<IGameClient*> IRehldsHookRegistry_Steam_NotifyClientDisconnect;
|
||||
|
||||
//PreProcessPacket
|
||||
typedef IHookChain<bool, uint8*, unsigned int, const netadr_t&> IRehldsHook_PreprocessPacket;
|
||||
typedef IHookChainRegistry<bool, uint8*, unsigned int, const netadr_t&> IRehldsHookRegistry_PreprocessPacket;
|
||||
|
||||
//ValidateCommand
|
||||
typedef IHookChain<bool, const char*, cmd_source_t, IGameClient*> IRehldsHook_ValidateCommand;
|
||||
typedef IHookChainRegistry<bool, const char*, cmd_source_t, IGameClient*> IRehldsHookRegistry_ValidateCommand;
|
||||
|
||||
//ExecuteServerStringCmd
|
||||
typedef IVoidHookChain<const char*, cmd_source_t, IGameClient*> IRehldsHook_ExecuteServerStringCmd;
|
||||
typedef IVoidHookChainRegistry<const char*, cmd_source_t, IGameClient*> IRehldsHookRegistry_ExecuteServerStringCmd;
|
||||
|
||||
//ClientConnected
|
||||
typedef IVoidHookChain<IGameClient*> IRehldsHook_ClientConnected;
|
||||
typedef IVoidHookChainRegistry<IGameClient*> IRehldsHookRegistry_ClientConnected;
|
||||
|
||||
//HandleNetCommand
|
||||
typedef IVoidHookChain<IGameClient*, int8> IRehldsHook_HandleNetCommand;
|
||||
typedef IVoidHookChainRegistry<IGameClient*, int8> IRehldsHookRegistry_HandleNetCommand;
|
||||
|
||||
//Mod_LoadBrushModel
|
||||
typedef IVoidHookChain<model_t*, void*> IRehldsHook_Mod_LoadBrushModel;
|
||||
typedef IVoidHookChainRegistry<model_t*, void*> IRehldsHookRegistry_Mod_LoadBrushModel;
|
||||
|
||||
//Mod_LoadStudioModel
|
||||
typedef IVoidHookChain<model_t*, void*> IRehldsHook_Mod_LoadStudioModel;
|
||||
typedef IVoidHookChainRegistry<model_t*, void*> IRehldsHookRegistry_Mod_LoadStudioModel;
|
||||
|
||||
//SV_EmitEvents hook
|
||||
typedef IVoidHookChain<IGameClient *, struct packet_entities_s *, sizebuf_t *> IRehldsHook_SV_EmitEvents;
|
||||
typedef IVoidHookChainRegistry<IGameClient *, struct packet_entities_s *, sizebuf_t *> IRehldsHookRegistry_SV_EmitEvents;
|
||||
|
||||
//EV_PlayReliableEvent hook
|
||||
typedef IVoidHookChain<IGameClient *, int, unsigned short, float, struct event_args_s *> IRehldsHook_EV_PlayReliableEvent;
|
||||
typedef IVoidHookChainRegistry<IGameClient *, int, unsigned short, float, struct event_args_s *> IRehldsHookRegistry_EV_PlayReliableEvent;
|
||||
|
||||
//SV_StartSound hook
|
||||
typedef IVoidHookChain<int , edict_t *, int, const char *, int, float, int, int> IRehldsHook_SV_StartSound;
|
||||
typedef IVoidHookChainRegistry<int , edict_t *, int, const char *, int, float, int, int> IRehldsHookRegistry_SV_StartSound;
|
||||
|
||||
//PF_Remove_I hook
|
||||
typedef IVoidHookChain<edict_t *> IRehldsHook_PF_Remove_I;
|
||||
typedef IVoidHookChainRegistry<edict_t *> IRehldsHookRegistry_PF_Remove_I;
|
||||
|
||||
//PF_BuildSoundMsg_I hook
|
||||
typedef IVoidHookChain<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> IRehldsHook_PF_BuildSoundMsg_I;
|
||||
typedef IVoidHookChainRegistry<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> IRehldsHookRegistry_PF_BuildSoundMsg_I;
|
||||
|
||||
//SV_WriteFullClientUpdate hook
|
||||
typedef IVoidHookChain<IGameClient *, char *, size_t, sizebuf_t *, IGameClient *> IRehldsHook_SV_WriteFullClientUpdate;
|
||||
typedef IVoidHookChainRegistry<IGameClient *, char *, size_t, sizebuf_t *, IGameClient *> IRehldsHookRegistry_SV_WriteFullClientUpdate;
|
||||
|
||||
//SV_CheckConsistencyResponse hook
|
||||
typedef IHookChain<bool, IGameClient *, resource_t *, uint32> IRehldsHook_SV_CheckConsistencyResponse;
|
||||
typedef IHookChainRegistry<bool, IGameClient *, resource_t *, uint32> IRehldsHookRegistry_SV_CheckConsistencyResponse;
|
||||
|
||||
//SV_DropClient hook
|
||||
typedef IVoidHookChain<IGameClient*, bool, const char*> IRehldsHook_SV_DropClient;
|
||||
typedef IVoidHookChainRegistry<IGameClient*, bool, const char*> IRehldsHookRegistry_SV_DropClient;
|
||||
|
||||
//SV_ActivateServer hook
|
||||
typedef IVoidHookChain<int> IRehldsHook_SV_ActivateServer;
|
||||
typedef IVoidHookChainRegistry<int> IRehldsHookRegistry_SV_ActivateServer;
|
||||
|
||||
//SV_WriteVoiceCodec hook
|
||||
typedef IVoidHookChain<sizebuf_t *> IRehldsHook_SV_WriteVoiceCodec;
|
||||
typedef IVoidHookChainRegistry<sizebuf_t *> IRehldsHookRegistry_SV_WriteVoiceCodec;
|
||||
|
||||
//Steam_GSGetSteamID hook
|
||||
typedef IHookChain<uint64> IRehldsHook_Steam_GSGetSteamID;
|
||||
typedef IHookChainRegistry<uint64> IRehldsHookRegistry_Steam_GSGetSteamID;
|
||||
|
||||
//SV_TransferConsistencyInfo hook
|
||||
typedef IHookChain<int> IRehldsHook_SV_TransferConsistencyInfo;
|
||||
typedef IHookChainRegistry<int> IRehldsHookRegistry_SV_TransferConsistencyInfo;
|
||||
|
||||
//Steam_GSBUpdateUserData hook
|
||||
typedef IHookChain<bool, uint64, const char *, uint32> IRehldsHook_Steam_GSBUpdateUserData;
|
||||
typedef IHookChainRegistry<bool, uint64, const char *, uint32> IRehldsHookRegistry_Steam_GSBUpdateUserData;
|
||||
|
||||
//Cvar_DirectSet hook
|
||||
typedef IVoidHookChain<struct cvar_s *, const char *> IRehldsHook_Cvar_DirectSet;
|
||||
typedef IVoidHookChainRegistry<struct cvar_s *, const char *> IRehldsHookRegistry_Cvar_DirectSet;
|
||||
|
||||
//SV_EstablishTimeBase hook
|
||||
typedef IVoidHookChain<IGameClient *, struct usercmd_s *, int, int, int> IRehldsHook_SV_EstablishTimeBase;
|
||||
typedef IVoidHookChainRegistry<IGameClient *, struct usercmd_s *, int, int, int> IRehldsHookRegistry_SV_EstablishTimeBase;
|
||||
|
||||
//SV_Spawn_f hook
|
||||
typedef IVoidHookChain<> IRehldsHook_SV_Spawn_f;
|
||||
typedef IVoidHookChainRegistry<> IRehldsHookRegistry_SV_Spawn_f;
|
||||
|
||||
//SV_CreatePacketEntities hook
|
||||
typedef IHookChain<int, enum sv_delta_s, IGameClient *, struct packet_entities_s *, struct sizebuf_s *> IRehldsHook_SV_CreatePacketEntities;
|
||||
typedef IHookChainRegistry<int, enum sv_delta_s, IGameClient *, struct packet_entities_s *, struct sizebuf_s *> IRehldsHookRegistry_SV_CreatePacketEntities;
|
||||
|
||||
//SV_EmitSound2 hook
|
||||
typedef IHookChain<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHook_SV_EmitSound2;
|
||||
typedef IHookChainRegistry<bool, edict_t *, IGameClient *, int, const char*, float, float, int, int, int, const float*> IRehldsHookRegistry_SV_EmitSound2;
|
||||
|
||||
class IRehldsHookchains {
|
||||
public:
|
||||
virtual ~IRehldsHookchains() { }
|
||||
|
||||
virtual IRehldsHookRegistry_Steam_NotifyClientConnect* Steam_NotifyClientConnect() = 0;
|
||||
virtual IRehldsHookRegistry_SV_ConnectClient* SV_ConnectClient() = 0;
|
||||
virtual IRehldsHookRegistry_SV_GetIDString* SV_GetIDString() = 0;
|
||||
virtual IRehldsHookRegistry_SV_SendServerinfo* SV_SendServerinfo() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CheckProtocol* SV_CheckProtocol() = 0;
|
||||
virtual IRehldsHookRegistry_SVC_GetChallenge_mod* SVC_GetChallenge_mod() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CheckKeyInfo* SV_CheckKeyInfo() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CheckIPRestrictions* SV_CheckIPRestrictions() = 0;
|
||||
virtual IRehldsHookRegistry_SV_FinishCertificateCheck* SV_FinishCertificateCheck() = 0;
|
||||
virtual IRehldsHookRegistry_Steam_NotifyBotConnect* Steam_NotifyBotConnect() = 0;
|
||||
virtual IRehldsHookRegistry_SerializeSteamId* SerializeSteamId() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CompareUserID* SV_CompareUserID() = 0;
|
||||
virtual IRehldsHookRegistry_Steam_NotifyClientDisconnect* Steam_NotifyClientDisconnect() = 0;
|
||||
virtual IRehldsHookRegistry_PreprocessPacket* PreprocessPacket() = 0;
|
||||
virtual IRehldsHookRegistry_ValidateCommand* ValidateCommand() = 0;
|
||||
virtual IRehldsHookRegistry_ClientConnected* ClientConnected() = 0;
|
||||
virtual IRehldsHookRegistry_HandleNetCommand* HandleNetCommand() = 0;
|
||||
virtual IRehldsHookRegistry_Mod_LoadBrushModel* Mod_LoadBrushModel() = 0;
|
||||
virtual IRehldsHookRegistry_Mod_LoadStudioModel* Mod_LoadStudioModel() = 0;
|
||||
virtual IRehldsHookRegistry_ExecuteServerStringCmd* ExecuteServerStringCmd() = 0;
|
||||
virtual IRehldsHookRegistry_SV_EmitEvents* SV_EmitEvents() = 0;
|
||||
virtual IRehldsHookRegistry_EV_PlayReliableEvent* EV_PlayReliableEvent() = 0;
|
||||
virtual IRehldsHookRegistry_SV_StartSound* SV_StartSound() = 0;
|
||||
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I() = 0;
|
||||
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I() = 0;
|
||||
virtual IRehldsHookRegistry_SV_WriteFullClientUpdate* SV_WriteFullClientUpdate() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CheckConsistencyResponse* SV_CheckConsistencyResponse() = 0;
|
||||
virtual IRehldsHookRegistry_SV_DropClient* SV_DropClient() = 0;
|
||||
virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer() = 0;
|
||||
virtual IRehldsHookRegistry_SV_WriteVoiceCodec* SV_WriteVoiceCodec() = 0;
|
||||
virtual IRehldsHookRegistry_Steam_GSGetSteamID* Steam_GSGetSteamID() = 0;
|
||||
virtual IRehldsHookRegistry_SV_TransferConsistencyInfo* SV_TransferConsistencyInfo() = 0;
|
||||
virtual IRehldsHookRegistry_Steam_GSBUpdateUserData* Steam_GSBUpdateUserData() = 0;
|
||||
virtual IRehldsHookRegistry_Cvar_DirectSet* Cvar_DirectSet() = 0;
|
||||
virtual IRehldsHookRegistry_SV_EstablishTimeBase* SV_EstablishTimeBase() = 0;
|
||||
virtual IRehldsHookRegistry_SV_Spawn_f* SV_Spawn_f() = 0;
|
||||
virtual IRehldsHookRegistry_SV_CreatePacketEntities* SV_CreatePacketEntities() = 0;
|
||||
virtual IRehldsHookRegistry_SV_EmitSound2* SV_EmitSound2() = 0;
|
||||
};
|
||||
|
||||
struct RehldsFuncs_t {
|
||||
void(*DropClient)(IGameClient* cl, bool crash, const char* fmt, ...);
|
||||
void(*RejectConnection)(netadr_t *adr, char *fmt, ...);
|
||||
qboolean(*SteamNotifyBotConnect)(IGameClient* cl);
|
||||
sizebuf_t*(*GetNetMessage)();
|
||||
IGameClient*(*GetHostClient)();
|
||||
int*(*GetMsgReadCount)();
|
||||
qboolean(*FilterUser)(USERID_t*);
|
||||
void(*NET_SendPacket)(unsigned int length, void *data, const netadr_t &to);
|
||||
void(*TokenizeString)(char* s);
|
||||
bool(*CheckChallenge)(const netadr_t& adr, int challenge);
|
||||
void(*SendUserReg)(sizebuf_t* msg);
|
||||
void(*WriteDeltaDescriptionsToClient)(sizebuf_t* msg);
|
||||
void(*SetMoveVars)();
|
||||
void(*WriteMovevarsToClient)(sizebuf_t* msg);
|
||||
char*(*GetClientFallback)();
|
||||
int*(*GetAllowCheats)();
|
||||
bool(*GSBSecure)();
|
||||
int(*GetBuildNumber)();
|
||||
double(*GetRealTime)();
|
||||
int*(*GetMsgBadRead)();
|
||||
cmd_source_t*(*GetCmdSource)();
|
||||
void(*Log)(const char* prefix, const char* msg);
|
||||
DLL_FUNCTIONS *(*GetEntityInterface)();
|
||||
void(*EV_PlayReliableEvent)(IGameClient *cl, int entindex, unsigned short eventindex, float delay, struct event_args_s *pargs);
|
||||
int(*SV_LookupSoundIndex)(const char *sample);
|
||||
void(*MSG_StartBitWriting)(sizebuf_t *buf);
|
||||
void(*MSG_WriteBits)(uint32 data, int numbits);
|
||||
void(*MSG_WriteBitVec3Coord)(const float *fa);
|
||||
void(*MSG_EndBitWriting)(sizebuf_t *buf);
|
||||
void*(*SZ_GetSpace)(sizebuf_t *buf, int length);
|
||||
cvar_t*(*GetCvarVars)();
|
||||
int (*SV_GetChallenge)(const netadr_t& adr);
|
||||
void (*SV_AddResource)(resourcetype_t type, const char *name, int size, unsigned char flags, int index);
|
||||
int(*MSG_ReadShort)(void);
|
||||
int(*MSG_ReadBuf)(int iSize, void *pbuf);
|
||||
void(*MSG_WriteBuf)(sizebuf_t *sb, int iSize, void *buf);
|
||||
void(*MSG_WriteByte)(sizebuf_t *sb, int c);
|
||||
void(*MSG_WriteShort)(sizebuf_t *sb, int c);
|
||||
void(*MSG_WriteString)(sizebuf_t *sb, const char *s);
|
||||
void*(*GetPluginApi)(const char *name);
|
||||
void(*RegisterPluginApi)(const char *name, void *impl);
|
||||
qboolean(*SV_FileInConsistencyList)(const char *filename, struct consistency_s **ppconsist);
|
||||
qboolean(*Steam_NotifyClientConnect)(IGameClient *cl, const void *pvSteam2Key, unsigned int ucbSteam2Key);
|
||||
void(*Steam_NotifyClientDisconnect)(IGameClient* cl);
|
||||
void(*SV_StartSound)(int recipients, edict_t *entity, int channel, const char *sample, int volume, float attenuation, int flags, int pitch);
|
||||
bool(*SV_EmitSound2)(edict_t *entity, IGameClient *receiver, int channel, const char *sample, float volume, float attenuation, int flags, int pitch, int emitFlags, const float *pOrigin);
|
||||
void(*SV_UpdateUserInfo)(IGameClient *pGameClient);
|
||||
bool(*StripUnprintableAndSpace)(char *pch);
|
||||
};
|
||||
|
||||
class IRehldsApi {
|
||||
public:
|
||||
virtual ~IRehldsApi() { }
|
||||
|
||||
virtual int GetMajorVersion() = 0;
|
||||
virtual int GetMinorVersion() = 0;
|
||||
virtual const RehldsFuncs_t* GetFuncs() = 0;
|
||||
virtual IRehldsHookchains* GetHookchains() = 0;
|
||||
virtual IRehldsServerStatic* GetServerStatic() = 0;
|
||||
virtual IRehldsServerData* GetServerData() = 0;
|
||||
virtual IRehldsFlightRecorder* GetFlightRecorder() = 0;
|
||||
};
|
||||
|
||||
#define VREHLDS_HLDS_API_VERSION "VREHLDS_HLDS_API_VERSION001"
|
@ -1,109 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
class INetChan;
|
||||
class IGameClient;
|
||||
|
||||
#include <archtypes.h>
|
||||
#include <const.h>
|
||||
|
||||
class INetChan;
|
||||
class IGameClient;
|
||||
|
||||
class IGameClient {
|
||||
public:
|
||||
virtual int GetId() = 0;
|
||||
|
||||
virtual bool IsActive() = 0;
|
||||
virtual void SetActive(bool active) = 0;
|
||||
|
||||
virtual bool IsSpawned() = 0;
|
||||
virtual void SetSpawned(bool spawned) = 0;
|
||||
|
||||
virtual INetChan* GetNetChan() = 0;
|
||||
|
||||
virtual sizebuf_t* GetDatagram() = 0;
|
||||
|
||||
virtual edict_t* GetEdict() = 0;
|
||||
|
||||
virtual USERID_t* GetNetworkUserID() = 0;
|
||||
|
||||
virtual const char* GetName() = 0;
|
||||
|
||||
virtual bool IsConnected() = 0;
|
||||
virtual void SetConnected(bool connected) = 0;
|
||||
|
||||
virtual uint32 GetVoiceStream(int stream_id) = 0;
|
||||
virtual void SetLastVoiceTime(double time) = 0;
|
||||
virtual double GetLastVoiceTime() = 0;
|
||||
virtual bool GetLoopback() = 0;
|
||||
virtual struct usercmd_s *GetLastCmd() = 0;
|
||||
};
|
||||
|
||||
class INetChan {
|
||||
public:
|
||||
virtual const netadr_t* GetRemoteAdr() = 0;
|
||||
virtual sizebuf_t* GetMessageBuf() = 0;
|
||||
};
|
||||
|
||||
class IRehldsServerStatic {
|
||||
public:
|
||||
virtual ~IRehldsServerStatic() { }
|
||||
|
||||
virtual int GetMaxClients() = 0;
|
||||
virtual bool IsLogActive() = 0;
|
||||
virtual IGameClient* GetClient(int id) = 0;
|
||||
virtual client_t* GetClient_t(int id) = 0;
|
||||
virtual int GetIndexOfClient_t(client_t* client) = 0;
|
||||
};
|
||||
|
||||
class IRehldsServerData {
|
||||
public:
|
||||
virtual ~IRehldsServerData() { }
|
||||
|
||||
virtual const char* GetModelName() = 0;
|
||||
virtual const char* GetName() = 0;
|
||||
virtual uint32 GetWorldmapCrc() = 0;
|
||||
virtual uint8* GetClientDllMd5() = 0;
|
||||
virtual sizebuf_t* GetDatagram() = 0;
|
||||
virtual sizebuf_t* GetReliableDatagram() = 0;
|
||||
|
||||
virtual void SetModelName(const char* modelname) = 0;
|
||||
virtual void SetConsistencyNum(int num) = 0;
|
||||
virtual int GetConsistencyNum() = 0;
|
||||
virtual int GetResourcesNum() = 0;
|
||||
virtual int GetDecalNameNum() = 0;
|
||||
|
||||
virtual double GetTime() = 0;
|
||||
virtual void SetResourcesNum(int num) = 0;
|
||||
virtual struct resource_s *GetResource(int index) = 0;
|
||||
virtual void SetName(const char* name) = 0;
|
||||
virtual class ISteamGameServer *GetSteamGameServer() = 0;
|
||||
virtual struct netadr_s *GetNetFrom() = 0;
|
||||
};
|
@ -9,6 +9,11 @@ IRehldsServerStatic* RehldsSvs;
|
||||
|
||||
bool RehldsApi_Init()
|
||||
{
|
||||
if (!IS_DEDICATED_SERVER())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
auto library = "swds";
|
||||
#elif defined(PLATFORM_POSIX)
|
||||
|
Loading…
Reference in New Issue
Block a user