From 7ccb819f867493f8ec202ea3b39c94c198c64584 Mon Sep 17 00:00:00 2001 From: JustSomePwner Date: Thu, 30 Aug 2018 14:01:54 +0200 Subject: first --- gmod/autowall.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gmod/autowall.hpp (limited to 'gmod/autowall.hpp') diff --git a/gmod/autowall.hpp b/gmod/autowall.hpp new file mode 100644 index 0000000..dfddbcc --- /dev/null +++ b/gmod/autowall.hpp @@ -0,0 +1,34 @@ +#pragma once +#include "sdk.hpp" +#include "pattern.hpp" +#include "interface.hpp" + +struct fire_bullet_data_t { + vec3_t src; + CGameTrace enter_trace; + vec3_t direction; + CTraceFilter filter; + float trace_length; + float trace_length_remaining; + float length_to_end; + float current_damage; + int penetrate_count; +}; + +namespace features +{ + class c_autowall { + private: + bool is_armored( c_base_player* entity, int armor_value, int hitgroup ); + void scale_damage( c_base_player* entity, int hitgroup, float weapon_armor_ratio, float& damage ); + void trace_line( const vec3_t& abs_start, const vec3_t& abs_end, unsigned mask, void* ignore, CGameTrace* trace ); + bool is_breakable( IClientEntity* ent ); + + bool trace_to_exit( vec3_t start, vec3_t& dir, vec3_t& out_end, CGameTrace& tr, CGameTrace* exit_trace ); + + public: + bool handle_bullet_penetration( weapon_info_t* wpn_data, fire_bullet_data_t& data ); + bool fire_bullet( c_base_player* shooter, c_base_player* target, weapon_info_t* wep_data, fire_bullet_data_t& data, bool ent_check = true, bool scale_damage = true ); + float run( c_base_player* shooter, c_base_player* target, const vec3_t& end, bool ent_check = true ); + }; +} \ No newline at end of file -- cgit v1.2.3