summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite
diff options
context:
space:
mode:
Diffstat (limited to 'cheat/internal_rewrite')
-rw-r--r--cheat/internal_rewrite/emit_sound.cpp32
-rw-r--r--cheat/internal_rewrite/hooks.cpp4
-rw-r--r--cheat/internal_rewrite/hooks.hpp8
-rw-r--r--cheat/internal_rewrite/identity.cpp2
-rw-r--r--cheat/internal_rewrite/ui.h4
-rw-r--r--cheat/internal_rewrite/visual_world.cpp16
6 files changed, 45 insertions, 21 deletions
diff --git a/cheat/internal_rewrite/emit_sound.cpp b/cheat/internal_rewrite/emit_sound.cpp
index 13ae28a..de4962b 100644
--- a/cheat/internal_rewrite/emit_sound.cpp
+++ b/cheat/internal_rewrite/emit_sound.cpp
@@ -2,26 +2,28 @@
#include "hooks.hpp"
#include "settings.hpp"
-/*void __fastcall hooks::emit_sound( void* ecx_, void* edx_, void* filter, int ent, int channel, const char* sound, uint32_t hash,
+void __fastcall hooks::emit_sound( void* ecx_, void* edx_, void* filter, int ent, int channel, const char* sound, uint32_t hash,
const char* sample, float volume, float attenuation, int seed, int flags, int pitch, const vec3_t* origin,
- const vec3_t* direction, vec3_t* origins, bool update_pos, float sound_time, int speaker_entry ) {
- static auto emit_sound_o = g_csgo.m_engine_sound->get_old_function< decltype( &hooks::emit_sound ) >( 5 );
+ const vec3_t* direction, vec3_t* origins, bool update_pos, float sound_time, int speaker_entry, void *unk01 ) {
+ //static auto emit_sound_o = g_csgo.m_engine_sound->get_old_function< decltype( &hooks::emit_sound ) >( 5 );
- if( !g_csgo.m_panic && origin ) {
- auto entity = g_csgo.m_entlist( )->GetClientEntity< >( ent );
- if( entity && entity->is_player( ) && entity->ce( )->IsDormant( ) &&
- ent >= 0 && ent <= 64 )
- g_cheat.m_visuals.update_position( ent, *origin );
- }
+ // this is already implemented in visual_player.cpp
+ //if( !g_csgo.m_panic && origin ) {
+ // auto entity = g_csgo.m_entlist( )->GetClientEntity< >( ent );
+ // if( entity && entity->is_player( ) && entity->ce( )->IsDormant( ) &&
+ // ent >= 0 && ent <= 64 )
+ // g_cheat.m_visuals.update_position( ent, *origin );
+ //}
- if( strstr( sample, xors( "weapon" ) ) && g_settings.misc.no_sound )
+ if( g_settings.misc.no_sound && strstr( sample, xors( "weapon" ) ) )
volume = 0.f;
- if( ( strstr( sample, xors( "player/footsteps" ) ) || strstr( sample, xors( "player/land" ) ) ) && origin && g_settings.visuals.sound ) {
- g_cheat.m_visuals.store_sound( ent, *origin );
- }
+ // todo: fix this not being drawn
+ //if( g_settings.visuals.sound && ( strstr( sample, xors( "player/footsteps" ) ) || strstr( sample, xors( "player/land" ) ) ) && origin ) {
+ // g_cheat.m_visuals.store_sound( ent, *origin );
+ //}
emit_sound_o( ecx_, 0, filter, ent, channel, sound, hash, sample,
volume, attenuation, seed, flags, pitch, origin, direction,
- origins, update_pos, sound_time, speaker_entry );
-}*/ \ No newline at end of file
+ origins, update_pos, sound_time, speaker_entry, unk01 );
+} \ No newline at end of file
diff --git a/cheat/internal_rewrite/hooks.cpp b/cheat/internal_rewrite/hooks.cpp
index e786a2b..685d7ea 100644
--- a/cheat/internal_rewrite/hooks.cpp
+++ b/cheat/internal_rewrite/hooks.cpp
@@ -33,6 +33,7 @@ namespace hooks {
decltype( &play_sound ) play_sound_o;
decltype( &convar_getint ) convar_getint_o;
decltype( &packet_start ) packet_start_o;
+ decltype(&emit_sound) emit_sound_o;
}
hooks::c_netvar_proxy hooks::lby_proxy;
@@ -82,6 +83,9 @@ bool hooks::commit( factory::c_csgo* instance ) {
scene_end_o = d->create_hook( &hooks::scene_end, instance->m_render_view->get_old_function< void* >( 9 ) );
get_screen_size_o = d->create_hook( &hooks::get_screen_size, instance->m_surface->get_old_function< void* >( 44 ) );
+ // this has annoyed me for so long
+ emit_sound_o = d->create_hook(&hooks::emit_sound, instance->m_engine_sound->get_old_function< void * >(5));
+
on_screen_size_changed_o = d->create_hook( &hooks::on_screen_size_changed, instance->m_surface->get_old_function< void* >( 116 ) );
play_sound_o = d->create_hook( &hooks::play_sound, instance->m_surface->get_old_function< void* >( 82 ) );
material_system_o = d->create_hook( &hooks::material_system, instance->m_mat_system->get_old_function< void* >( 21 ) );
diff --git a/cheat/internal_rewrite/hooks.hpp b/cheat/internal_rewrite/hooks.hpp
index ab28545..dc23672 100644
--- a/cheat/internal_rewrite/hooks.hpp
+++ b/cheat/internal_rewrite/hooks.hpp
@@ -59,9 +59,11 @@ namespace hooks
void __fastcall override_view( void* ecx_, void* edx_, CViewSetup* setup );
extern decltype( &override_view ) override_view_o;
- //void __fastcall emit_sound( void* ecx_, void* edx_, void* filter, int ent, int channel, const char* sound, uint32_t hash,
- // const char* sample, float volume, float attenuation, int seed, int flags, int pitch, const vec3_t* origin,
- // const vec3_t* direction, vec3_t* origins, bool update_pos, float sound_time, int speaker_entry );
+ void __fastcall emit_sound( void* ecx_, void* edx_, void* filter, int ent, int channel, const char* sound, uint32_t hash,
+ const char* sample, float volume, float attenuation, int seed, int flags, int pitch, const vec3_t* origin,
+ const vec3_t* direction, vec3_t* origins, bool update_pos, float sound_time, int speaker_entry, void *unk01 );
+ extern decltype(&emit_sound) emit_sound_o;
+
void __fastcall shut_down( void* ecx_, void* edx_ );
extern decltype( &shut_down ) shut_down_o;
diff --git a/cheat/internal_rewrite/identity.cpp b/cheat/internal_rewrite/identity.cpp
index b58e75b..d17bb29 100644
--- a/cheat/internal_rewrite/identity.cpp
+++ b/cheat/internal_rewrite/identity.cpp
@@ -25,7 +25,7 @@ namespace features
return;
}
- static const std::string moneybot_string = xors( "dmt hook " );
+ static const std::string moneybot_string = xors( "moneybot " );
static std::string clantag_str = moneybot_string;
static auto next_settime = g_csgo.m_globals->m_curtime;
diff --git a/cheat/internal_rewrite/ui.h b/cheat/internal_rewrite/ui.h
index 968a969..7dc88a3 100644
--- a/cheat/internal_rewrite/ui.h
+++ b/cheat/internal_rewrite/ui.h
@@ -531,8 +531,8 @@ namespace ui
player_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "high ping warning" ), &g_settings.visuals.ping ) );
player_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "resolver indicator" ), &g_settings.visuals.resolver_indicator ) )->add_item(
std::make_shared< ui::c_color_picker >( 160, 4, 15, &g_settings.visuals.lby_bar_clr( ) ) );
- player_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "sound" ), &g_settings.visuals.sound ) )->set_cond( [ ]( ) { return !g_settings.misc.hide_from_obs; } );
- player_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 120, 220, 500, &g_settings.visuals.sound_range ) )->set_cond( [ ]( ) { return g_settings.visuals.sound && !g_settings.misc.hide_from_obs; } );
+ //player_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "sound" ), &g_settings.visuals.sound ) )->set_cond( [ ]( ) { return !g_settings.misc.hide_from_obs; } );
+ //player_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 120, 220, 500, &g_settings.visuals.sound_range ) )->set_cond( [ ]( ) { return g_settings.visuals.sound && !g_settings.misc.hide_from_obs; } );
}
auto hud_form = std::make_shared< ui::c_form >( 0, 0, 215, 0, xors( "hud" ) ); {
diff --git a/cheat/internal_rewrite/visual_world.cpp b/cheat/internal_rewrite/visual_world.cpp
index ea3d31d..b45aa3f 100644
--- a/cheat/internal_rewrite/visual_world.cpp
+++ b/cheat/internal_rewrite/visual_world.cpp
@@ -392,6 +392,22 @@ namespace features
}
}
else if( is_sky ) {
+ // todo: make the sky look nice as opposed to gay
+ /*
+ // epic skybox fix (for 3d skybox fog fucking up)
+ offsets->m_skybox_mod = *pattern::first_code_match< uint32_t * >(
+ instance->m_chl->dll( ),
+ STR( "80 BE ? ? ? ? ? 5E 0F 95 C0" ),
+ 0x2
+ );
+
+ // ...
+ auto &skybox_flag = *( uint8_t * )( ( uint32_t ) local_ptr + offsets->m_skybox_mod( ) );
+
+ if( config->visual->night_mode( ) )
+ skybox_flag = 0;
+ */
+
if( apply ) {
new_color = fclr_t( 0.f, 0.f, 0.f );
}