mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-28 14:37:57 +03:00
Implemented CCSEntity members to export in AMXX headers (#296)
This commit is contained in:
parent
4c1932c2c9
commit
5c38e6f5e4
@ -80,7 +80,8 @@ enum members_tables_e
|
|||||||
mt_mapinfo,
|
mt_mapinfo,
|
||||||
mt_csplayerweapon,
|
mt_csplayerweapon,
|
||||||
mt_gib,
|
mt_gib,
|
||||||
mt_netadr
|
mt_netadr,
|
||||||
|
mt_csentity
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager}
|
#define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager}
|
||||||
|
@ -6342,3 +6342,25 @@ enum CGib_Members
|
|||||||
*/
|
*/
|
||||||
m_Gib_lifeTime,
|
m_Gib_lifeTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CCSEntity API Members
|
||||||
|
*/
|
||||||
|
enum CCSEntity_Members
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Description: Penetration level of the damage caused by the inflictor
|
||||||
|
* Member type: unsigned char
|
||||||
|
* Get params: get_member(index, member);
|
||||||
|
* Set params: set_member(index, member, value);
|
||||||
|
*/
|
||||||
|
m_ucDmgPenetrationLevel = BEGIN_MEMBER_REGION(csplayerweapon),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Description: Cached inflictor passed inside TakeDamage to retrieve in Killed
|
||||||
|
* Member type: entvars_t *
|
||||||
|
* Get params: get_member(index, member);
|
||||||
|
* Set params: set_member(index, member, value);
|
||||||
|
*/
|
||||||
|
m_pevLastInflictor,
|
||||||
|
};
|
||||||
|
@ -47,12 +47,13 @@ public:
|
|||||||
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
|
||||||
|
entvars_t *m_pevLastInflictor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma region reserve_data_Region
|
#pragma region reserve_data_Region
|
||||||
#endif
|
#endif
|
||||||
char CCSEntity_Reserve[0x3FFF];
|
char CCSEntity_Reserve[0x3FF7];
|
||||||
|
|
||||||
virtual void func_reserve1() {};
|
virtual void func_reserve1() {};
|
||||||
virtual void func_reserve2() {};
|
virtual void func_reserve2() {};
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
#define MAPINFO_MEMBERS(mx) CLASS_MEMBERS_PREF(CMapInfo, mx, m_MapInfo_##mx, m_)
|
#define MAPINFO_MEMBERS(mx) CLASS_MEMBERS_PREF(CMapInfo, mx, m_MapInfo_##mx, m_)
|
||||||
#define CSPLWPN_MEMBERS(mx) CLASS_MEMBERS_PREF(CCSPlayerWeapon, mx, m_Weapon_##mx, m_)
|
#define CSPLWPN_MEMBERS(mx) CLASS_MEMBERS_PREF(CCSPlayerWeapon, mx, m_Weapon_##mx, m_)
|
||||||
#define GIB_MEMBERS(mx) CLASS_MEMBERS_PREF(CGib, mx, m_Gib_##mx, m_)
|
#define GIB_MEMBERS(mx) CLASS_MEMBERS_PREF(CGib, mx, m_Gib_##mx, m_)
|
||||||
|
#define CSENT_MEMBERS(mx) CLASS_MEMBERS(CCSEntity, mx, mx)
|
||||||
|
|
||||||
inline MType getMemberType(float*) { return MEMBER_FLOAT; }
|
inline MType getMemberType(float*) { return MEMBER_FLOAT; }
|
||||||
inline MType getMemberType(float) { return MEMBER_FLOAT; }
|
inline MType getMemberType(float) { return MEMBER_FLOAT; }
|
||||||
@ -1064,6 +1065,11 @@ member_t memberlist_netadr[] = {
|
|||||||
NETADR_MEMBERS(port)
|
NETADR_MEMBERS(port)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
member_t memberlist_csentity[] = {
|
||||||
|
CSENT_MEMBERS(m_ucDmgPenetrationLevel),
|
||||||
|
CSENT_MEMBERS(m_pevLastInflictor),
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // #ifdef __GNUC__
|
#endif // #ifdef __GNUC__
|
||||||
@ -1128,6 +1134,7 @@ member_t *memberlist_t::operator[](size_t members) const
|
|||||||
CASE(csplayerweapon)
|
CASE(csplayerweapon)
|
||||||
CASE(gib)
|
CASE(gib)
|
||||||
CASE(netadr)
|
CASE(netadr)
|
||||||
|
CASE(csentity)
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef CASE
|
#undef CASE
|
||||||
|
@ -83,7 +83,8 @@ struct memberlist_t
|
|||||||
mt_mapinfo,
|
mt_mapinfo,
|
||||||
mt_csplayerweapon,
|
mt_csplayerweapon,
|
||||||
mt_gib,
|
mt_gib,
|
||||||
mt_netadr
|
mt_netadr,
|
||||||
|
mt_csentity
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1088,3 +1089,9 @@ enum CGib_Members
|
|||||||
m_Gib_material,
|
m_Gib_material,
|
||||||
m_Gib_lifeTime,
|
m_Gib_lifeTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum CSEntity_Members
|
||||||
|
{
|
||||||
|
m_ucDmgPenetrationLevel = BEGIN_MEMBER_REGION(csentity),
|
||||||
|
m_pevLastInflictor,
|
||||||
|
};
|
||||||
|
@ -1122,6 +1122,7 @@ void *get_pdata_custom(CBaseEntity *pEntity, cell member)
|
|||||||
{
|
{
|
||||||
const auto table = memberlist_t::members_tables_e(member / MAX_REGION_RANGE);
|
const auto table = memberlist_t::members_tables_e(member / MAX_REGION_RANGE);
|
||||||
switch (table) {
|
switch (table) {
|
||||||
|
case memberlist_t::mt_csentity:
|
||||||
case memberlist_t::mt_csplayer:
|
case memberlist_t::mt_csplayer:
|
||||||
case memberlist_t::mt_csplayerweapon: {
|
case memberlist_t::mt_csplayerweapon: {
|
||||||
if (unlikely(pEntity->m_pEntity == nullptr)) {
|
if (unlikely(pEntity->m_pEntity == nullptr)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user