1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "base_cheat.hpp"
#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,
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 ) {
//static auto emit_sound_o = g_csgo.m_engine_sound->get_old_function< decltype( &hooks::emit_sound ) >( 5 );
// 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( g_settings.misc.no_sound && strstr( sample, xors( "weapon" ) ) )
volume = 0.f;
// todo: fix this not being drawn
// it's not drawn cause the option isn't in menu you dumbhead
if( g_settings.visuals.sound && ( strstr( sample, xors( "player/footsteps" ) ) || strstr( sample, xors( "player/land" ) ) ) && origin ) {
g_cheat.m_visuals.store_sound( ent, *origin );
}
//a
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, unk01 );
}
|