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/debug_show_spread.cpp | |
| parent | 564d979b79e8a5aaa5014eba0ecd36c61575934f (diff) | |
first
Diffstat (limited to 'gmod/debug_show_spread.cpp')
| -rw-r--r-- | gmod/debug_show_spread.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gmod/debug_show_spread.cpp b/gmod/debug_show_spread.cpp new file mode 100644 index 0000000..68931b2 --- /dev/null +++ b/gmod/debug_show_spread.cpp @@ -0,0 +1,16 @@ +#include "hooks.hpp"
+#include "context.hpp"
+
+int __fastcall hooks::debug_show_spread_get_int( void* ecx_, void* edx_ ) {
+ static auto original_fn = g_csgo.m_debug_show_spread->get_old_function< decltype( &debug_show_spread_get_int ) >( 13 );
+ if( !g_settings.visuals.snipers_crosshair || !g_ctx.run_frame( ) || !g_ctx.m_local->is_valid( ) || g_ctx.m_local->m_bIsScoped( ) ) {
+ return original_fn( ecx_, 0 );
+ }
+
+ auto weapon = g_ctx.m_local->get_weapon( );
+ if( !weapon || !weapon->is_sniper( ) ) {
+ return original_fn( ecx_, 0 );
+ }
+
+ return 3;
+}
\ No newline at end of file |
