From ed5263627f98e5531c6537c49f6ba1bc9dcccb77 Mon Sep 17 00:00:00 2001 From: fant1kua Date: Mon, 7 Jan 2019 10:49:05 +0200 Subject: [PATCH] Add m_flBaseDamage member (#124) * Features: add m_flBaseDamage --- gradle.properties | 2 +- .../amxmodx/scripting/include/reapi_gamedll_const.inc | 10 +++++++++- reapi/include/cssdk/dlls/API/CSPlayerWeapon.h | 1 + reapi/src/member_list.cpp | 5 +++-- reapi/src/member_list.h | 3 ++- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index ed3c114..08530cf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ majorVersion=5 -minorVersion=6 +minorVersion=7 maintenanceVersion=0 diff --git a/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc b/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc index c0851a1..4069feb 100644 --- a/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc +++ b/reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc @@ -4701,7 +4701,7 @@ enum CBasePlayerWeapon_Members * Get params: Float:get_member(index, member); * Set params: set_member(index, member, Float:value); */ - m_Weapon_flLastFireTime + m_Weapon_flLastFireTime, }; /** @@ -5758,4 +5758,12 @@ enum CCSPlayerWeapon_Members * Set params: set_member(index, member, bool:value); */ m_Weapon_bHasSecondaryAttack = BEGIN_MEMBER_REGION(csplayerweapon), + + /* + * Description: Basic damage that weapon deals before any multiplier, such as hitgroup, armor, distance and bullet penetration + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flBaseDamage, }; diff --git a/reapi/include/cssdk/dlls/API/CSPlayerWeapon.h b/reapi/include/cssdk/dlls/API/CSPlayerWeapon.h index 32e32f9..70317c9 100644 --- a/reapi/include/cssdk/dlls/API/CSPlayerWeapon.h +++ b/reapi/include/cssdk/dlls/API/CSPlayerWeapon.h @@ -41,6 +41,7 @@ public: public: bool m_bHasSecondaryAttack; + float m_flBaseDamage; }; // Inlines diff --git a/reapi/src/member_list.cpp b/reapi/src/member_list.cpp index b9e1f3a..deeb163 100644 --- a/reapi/src/member_list.cpp +++ b/reapi/src/member_list.cpp @@ -771,7 +771,7 @@ member_t memberlist_baseweapon[] = { BASEWPN_MEMBERS(usFireGlock18), BASEWPN_MEMBERS(usFireFamas), BASEWPN_MEMBERS(flPrevPrimaryAttack), - BASEWPN_MEMBERS(flLastFireTime), + BASEWPN_MEMBERS(flLastFireTime) }; member_t memberlist_weaponbox[] = { @@ -994,7 +994,8 @@ member_t memberlist_mapinfo[] = { }; member_t memberlist_csplayerweapon[] = { - CSPLWPN_MEMBERS(bHasSecondaryAttack) + CSPLWPN_MEMBERS(bHasSecondaryAttack), + CSPLWPN_MEMBERS(flBaseDamage), }; memberlist_t memberlist; diff --git a/reapi/src/member_list.h b/reapi/src/member_list.h index ba234cc..2f25507 100644 --- a/reapi/src/member_list.h +++ b/reapi/src/member_list.h @@ -781,7 +781,7 @@ enum CBasePlayerWeapon_Members m_Weapon_usFireGlock18, m_Weapon_usFireFamas, m_Weapon_flPrevPrimaryAttack, - m_Weapon_flLastFireTime + m_Weapon_flLastFireTime, }; enum CWeaponBox_Members @@ -1040,4 +1040,5 @@ enum MapInfo_Members enum CSPlayerWeapon_Members { m_Weapon_bHasSecondaryAttack = BEGIN_MEMBER_REGION(csplayerweapon), + m_Weapon_flBaseDamage, };