diff options
| author | JustSomePwner <crotchyalt@gmail.com> | 2018-08-30 14:01:54 +0200 |
|---|---|---|
| committer | JustSomePwner <crotchyalt@gmail.com> | 2018-08-30 14:01:54 +0200 |
| commit | 7ccb819f867493f8ec202ea3b39c94c198c64584 (patch) | |
| tree | 94622e61af0ff359e3d6689cf274d74f60b2492a /gmod/c_base_weapon.hpp | |
| parent | 564d979b79e8a5aaa5014eba0ecd36c61575934f (diff) | |
first
Diffstat (limited to 'gmod/c_base_weapon.hpp')
| -rw-r--r-- | gmod/c_base_weapon.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gmod/c_base_weapon.hpp b/gmod/c_base_weapon.hpp new file mode 100644 index 0000000..76884c8 --- /dev/null +++ b/gmod/c_base_weapon.hpp @@ -0,0 +1,48 @@ +#pragma once
+#include "util.hpp"
+#include "IClientEntityList.hpp"
+#include "netvars.hpp"
+#include "pattern.hpp"
+
+
+
+class c_base_weapon {
+public:
+ NETVAR( m_iClip1, "m_iClip1", "DT_BaseCombatWeapon", 0, int );
+ NETVAR( m_flNextPrimaryAttack, "m_flNextPrimaryAttack", "DT_BaseCombatWeapon", 0, float );
+ NETVAR( m_hOwner, "m_hOwner", "DT_BaseCombatWeapon", 0, uint32_t );
+ NETVAR( m_nModelIndex, "m_nModelIndex", "DT_BaseEntity", 0, int );
+
+ __forceinline IClientEntity* ce( ) {
+ return reinterpret_cast< IClientEntity* >( this );
+ }
+
+ __forceinline operator IClientEntity*( ) {
+ return reinterpret_cast< IClientEntity* >( this );
+ }
+
+ template < typename t >
+ __forceinline t& get( std::ptrdiff_t offset ) {
+ return *reinterpret_cast< t* >( uintptr_t( this ) + offset );
+ }
+
+ int get_max_clip1( ) {
+ return util::get_vfunc< 355, int >( this );
+ }
+
+ const char* get_class_name( ) {
+ return util::get_vfunc< 366, const char* >( this );
+ }
+
+ const char* get_print_name( ) {
+ return util::get_vfunc< 367, const char* >( this );
+ }
+
+ void* get_wpn_data( );
+
+ char get_hud_icon( );
+
+ bool is_cw20( );
+ bool is_fas2( );
+ float get_custom_cone( );
+};
\ No newline at end of file |
