mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 14:45:38 +03:00
ReGameDLL API: Implement BGetICSEntity/BGetIGameRules for check safe version interface.
This commit is contained in:
parent
69250cf2c1
commit
96938aec55
@ -204,6 +204,26 @@ AmmoInfo *CReGameApi::GetAmmoInfo(AmmoType ammoID) { return &CBasePlayerItem::m_
|
||||
AmmoInfoStruct *CReGameApi::GetAmmoInfoEx(AmmoType ammoID) { return ::GetAmmoInfo(ammoID); }
|
||||
AmmoInfoStruct *CReGameApi::GetAmmoInfoEx(const char *ammoName) { return ::GetAmmoInfo(ammoName); }
|
||||
|
||||
bool CReGameApi::BGetICSEntity(const char *pchVersion) const
|
||||
{
|
||||
if (!Q_stricmp(pchVersion, CSENTITY_API_INTERFACE_VERSION))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CReGameApi::BGetIGameRules(const char *pchVersion) const
|
||||
{
|
||||
if (!Q_stricmp(pchVersion, GAMERULES_API_INTERFACE_VERSION))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
EXT_FUNC void Regamedll_ChangeString_api(char *&dest, const char *source)
|
||||
{
|
||||
size_t len = Q_strlen(source);
|
||||
|
@ -781,6 +781,8 @@ public:
|
||||
EXT_FUNC virtual AmmoInfo *GetAmmoInfo(AmmoType ammoID);
|
||||
EXT_FUNC virtual AmmoInfoStruct *GetAmmoInfoEx(AmmoType ammoID);
|
||||
EXT_FUNC virtual AmmoInfoStruct *GetAmmoInfoEx(const char *ammoName);
|
||||
EXT_FUNC virtual bool BGetICSEntity(const char *pchVersion) const;
|
||||
EXT_FUNC virtual bool BGetIGameRules(const char *pchVersion) const;
|
||||
};
|
||||
|
||||
void Regamedll_ChangeString_api(char *&dest, const char *source);
|
||||
|
@ -337,6 +337,8 @@ public:
|
||||
bool m_bGameOver; // intermission or finale (deprecated name g_fGameOver)
|
||||
};
|
||||
|
||||
#define GAMERULES_API_INTERFACE_VERSION "GAMERULES_API_INTERFACE_VERSION001"
|
||||
|
||||
// CHalfLifeRules - rules for the single player Half-Life game.
|
||||
class CHalfLifeRules: public CGameRules
|
||||
{
|
||||
|
@ -32,6 +32,11 @@ class CBaseEntity;
|
||||
class CCSEntity
|
||||
{
|
||||
public:
|
||||
CCSEntity() :
|
||||
m_pContainingEntity(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
@ -63,3 +68,5 @@ class CCSMonster: public CCSToggle
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
#define CSENTITY_API_INTERFACE_VERSION "CSENTITY_API_INTERFACE_VERSION001"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <API/CSInterfaces.h>
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||
#define REGAMEDLL_API_VERSION_MINOR 10
|
||||
#define REGAMEDLL_API_VERSION_MINOR 11
|
||||
|
||||
// CBasePlayer::Spawn hook
|
||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||
@ -589,6 +589,8 @@ public:
|
||||
virtual struct AmmoInfo *GetAmmoInfo(AmmoType ammoID) = 0;
|
||||
virtual struct AmmoInfoStruct *GetAmmoInfoEx(AmmoType ammoID) = 0;
|
||||
virtual struct AmmoInfoStruct *GetAmmoInfoEx(const char *ammoName) = 0;
|
||||
virtual bool BGetICSEntity(const char *pchVersion) const = 0;
|
||||
virtual bool BGetIGameRules(const char *pchVersion) const = 0;
|
||||
};
|
||||
|
||||
#define VRE_GAMEDLL_API_VERSION "VRE_GAMEDLL_API_VERSION001"
|
||||
|
Loading…
Reference in New Issue
Block a user