Add basic ReHLDS and ReGameDLL support (#417)
* Add ReHLDS API files and its dependencies Note: This has been stolen from ReAPI AMXX module and modified/adjusted to match AMXX existing includes and to provide as less dependencies as possible as well * Add the necessary files to get ReHLDS interface * Split SV_DropClient into pre/post code * Init ReHLDS API and add SV_DropClient hook * Add Cvar_DirectSet hook and adjust code with helpers Note: we don't need to split code here. This is pretty much the naive and straight way, but fairly enough for our case. If it happens we got a lot more hooks, we may consider to use some class to manage better the things. * Move platform and interface stuff in their own files in public directory * Make sure to init cvar stuff after ReHLDS * Add ReGameDLL API files and its dependencies in cstrike module * Init ReHLDS in cstrike module and adjust code Note: About cs_uset_set_model(). ReHLDS API doesn't offer a way to know directly the precached models, so instead of looping through all the ressources, the models list is saved one time at map change into a hashmap. * Init ReGameDLL and adjust code * Fix linux compilation * Init ReGameDLL in fakemeta module and adjust code * Rename /reapi directory to /resdk to avoid confusion * Retrieve gamerules pointer through InstallGameRules in fakemeta module * Retrieve gamerules pointer through InstallGameRules in cstrike module Note: actually gamerules is not used if regamedll is enabled, but it could be used in future natives. * Fix a typo when ReGameDLL is not enabled * Fix missing interface check for ReHLDS. I'm pretty sure I was checking at the very first since I worked first on vanilla version of engine, looks like change has been lost.
This commit is contained in:
482
public/resdk/cstrike/regamedll_api.h
Normal file
482
public/resdk/cstrike/regamedll_api.h
Normal file
@ -0,0 +1,482 @@
|
||||
/*
|
||||
*
|
||||
* 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"
|
740
public/resdk/cstrike/regamedll_const.h
Normal file
740
public/resdk/cstrike/regamedll_const.h
Normal file
@ -0,0 +1,740 @@
|
||||
/*
|
||||
*
|
||||
* 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 };
|
303
public/resdk/cstrike/regamedll_interfaces.h
Normal file
303
public/resdk/cstrike/regamedll_interfaces.h
Normal file
@ -0,0 +1,303 @@
|
||||
/*
|
||||
*
|
||||
* 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);
|
||||
}
|
Reference in New Issue
Block a user