mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-29 08:05:46 +03:00
Tiny API code clean (#897)
This commit is contained in:
parent
15bca2eab9
commit
556406009f
@ -30,15 +30,15 @@
|
|||||||
|
|
||||||
void CCSEntity::FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker)
|
void CCSEntity::FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker)
|
||||||
{
|
{
|
||||||
m_pContainingEntity->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker);
|
BaseEntity()->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCSEntity::FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iTracerFreq, int iDamage, entvars_t *pevAttacker)
|
void CCSEntity::FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iTracerFreq, int iDamage, entvars_t *pevAttacker)
|
||||||
{
|
{
|
||||||
m_pContainingEntity->FireBuckshots(cShots, vecSrc, vecDirShooting, vecSpread, flDistance, iTracerFreq, iDamage, pevAttacker);
|
BaseEntity()->FireBuckshots(cShots, vecSrc, vecDirShooting, vecSpread, flDistance, iTracerFreq, iDamage, pevAttacker);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector CCSEntity::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)
|
Vector CCSEntity::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)
|
||||||
{
|
{
|
||||||
return m_pContainingEntity->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand);
|
return BaseEntity()->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ EXT_FUNC CBaseEntity *CCSPlayer::GiveNamedItemEx(const char *pszName)
|
|||||||
|
|
||||||
EXT_FUNC bool CCSPlayer::IsConnected() const
|
EXT_FUNC bool CCSPlayer::IsConnected() const
|
||||||
{
|
{
|
||||||
return m_pContainingEntity->has_disconnected == false;
|
return BaseEntity()->has_disconnected == false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXT_FUNC void CCSPlayer::SetAnimation(PLAYER_ANIM playerAnim)
|
EXT_FUNC void CCSPlayer::SetAnimation(PLAYER_ANIM playerAnim)
|
||||||
|
@ -43,6 +43,8 @@ public:
|
|||||||
virtual void FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iTracerFreq, int iDamage, entvars_t *pevAttacker);
|
virtual void FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, 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);
|
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);
|
||||||
|
|
||||||
|
CBaseEntity *BaseEntity() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CBaseEntity *m_pContainingEntity;
|
CBaseEntity *m_pContainingEntity;
|
||||||
unsigned char m_ucDmgPenetrationLevel; // penetration level of the damage caused by the inflictor
|
unsigned char m_ucDmgPenetrationLevel; // penetration level of the damage caused by the inflictor
|
||||||
@ -89,6 +91,12 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Inlines
|
||||||
|
inline CBaseEntity *CCSEntity::BaseEntity() const
|
||||||
|
{
|
||||||
|
return this->m_pContainingEntity;
|
||||||
|
}
|
||||||
|
|
||||||
inline void CBaseEntity::SetDmgPenetrationLevel(int iPenetrationLevel)
|
inline void CBaseEntity::SetDmgPenetrationLevel(int iPenetrationLevel)
|
||||||
{
|
{
|
||||||
#ifdef REGAMEDLL_API
|
#ifdef REGAMEDLL_API
|
||||||
|
@ -588,10 +588,6 @@ typedef IHookChainRegistry<BOOL, int, int> IReGameHookRegistry_CSGameRules_TeamS
|
|||||||
typedef IHookChain<void, CBasePlayer *, CBasePlayerItem *> IReGameHook_CSGameRules_PlayerGotWeapon;
|
typedef IHookChain<void, CBasePlayer *, CBasePlayerItem *> IReGameHook_CSGameRules_PlayerGotWeapon;
|
||||||
typedef IHookChainRegistry<void, CBasePlayer *, CBasePlayerItem *> IReGameHookRegistry_CSGameRules_PlayerGotWeapon;
|
typedef IHookChainRegistry<void, CBasePlayer *, CBasePlayerItem *> IReGameHookRegistry_CSGameRules_PlayerGotWeapon;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::SendDeathMessage hook
|
|
||||||
typedef IHookChain<void, class CBaseEntity *, class CBasePlayer *, class CBasePlayer *, struct entvars_s *, const char *, int, int> IReGameHook_CSGameRules_SendDeathMessage;
|
|
||||||
typedef IHookChainRegistry<void, class CBaseEntity *, class CBasePlayer *, class CBasePlayer *, struct entvars_s *, const char *, int, int> IReGameHookRegistry_CSGameRules_SendDeathMessage;
|
|
||||||
|
|
||||||
// CBotManager::OnEvent hook
|
// CBotManager::OnEvent hook
|
||||||
typedef IHookChain<void, GameEventType, CBaseEntity *, CBaseEntity *> IReGameHook_CBotManager_OnEvent;
|
typedef IHookChain<void, GameEventType, CBaseEntity *, CBaseEntity *> IReGameHook_CBotManager_OnEvent;
|
||||||
typedef IHookChainRegistry<void, GameEventType, CBaseEntity*, CBaseEntity*> IReGameHookRegistry_CBotManager_OnEvent;
|
typedef IHookChainRegistry<void, GameEventType, CBaseEntity*, CBaseEntity*> IReGameHookRegistry_CBotManager_OnEvent;
|
||||||
@ -616,6 +612,10 @@ typedef IHookChainRegistryClass<void, CBasePlayerWeapon, float, float, float, fl
|
|||||||
typedef IHookChainClass<void, CBasePlayerWeapon, int, int> IReGameHook_CBasePlayerWeapon_SendWeaponAnim;
|
typedef IHookChainClass<void, CBasePlayerWeapon, int, int> IReGameHook_CBasePlayerWeapon_SendWeaponAnim;
|
||||||
typedef IHookChainRegistryClass<void, CBasePlayerWeapon, int, int> IReGameHookRegistry_CBasePlayerWeapon_SendWeaponAnim;
|
typedef IHookChainRegistryClass<void, CBasePlayerWeapon, int, int> IReGameHookRegistry_CBasePlayerWeapon_SendWeaponAnim;
|
||||||
|
|
||||||
|
// CHalfLifeMultiplay::SendDeathMessage hook
|
||||||
|
typedef IHookChain<void, class CBaseEntity *, class CBasePlayer *, class CBasePlayer *, struct entvars_s *, const char *, int, int> IReGameHook_CSGameRules_SendDeathMessage;
|
||||||
|
typedef IHookChainRegistry<void, class CBaseEntity *, class CBasePlayer *, class CBasePlayer *, struct entvars_s *, const char *, int, int> IReGameHookRegistry_CSGameRules_SendDeathMessage;
|
||||||
|
|
||||||
// CBasePlayer::PlayerDeathThink hook
|
// CBasePlayer::PlayerDeathThink hook
|
||||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PlayerDeathThink;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PlayerDeathThink;
|
||||||
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PlayerDeathThink;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PlayerDeathThink;
|
||||||
|
Loading…
Reference in New Issue
Block a user