diff options
| author | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
| commit | 3d412a4b30a9f7c7f51ea6562e694315948bd3da (patch) | |
| tree | 26d67dfd1f3e5fd12903ad13e85d0cb8bcf8f21c /cheat/tf2/emit_sound.cpp | |
| parent | e4729e4393d90271a3814c7a79950a660c48325a (diff) | |
cleaned up
in short, the cheat and loader are now separate solutions. unused stuff was moved into the legacy solution in case anyone wants to compile it or whatever.
i can change this back if you want to. also, i configured the loader to compile in x64, and have separate build types for linux and win64
Diffstat (limited to 'cheat/tf2/emit_sound.cpp')
| -rw-r--r-- | cheat/tf2/emit_sound.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cheat/tf2/emit_sound.cpp b/cheat/tf2/emit_sound.cpp new file mode 100644 index 0000000..b311b84 --- /dev/null +++ b/cheat/tf2/emit_sound.cpp @@ -0,0 +1,25 @@ +#include "base_cheat.h"
+#include "hooks.h"
+#include "settings.h"
+
+//eenie meenie miney moe i kepy this in here incase i wanted to ever do something with it i could fix it to match tf2's emitsound but yknow what? i prolly wont watadearhiugaer sorry i spilt water on my desk and smashed my face into the keyboard
+
+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 = cl.m_engine_sound->get_old_function< decltype( &hooks::emit_sound ) >( 5 );
+
+ if( !cl.m_panic && origin ) {
+ auto entity = cl.m_entlist( )->get_client_entity< c_base_player >( ent );
+ if( entity && entity->is_player( ) && entity->ce( )->is_dormant( ) &&
+ ent >= 0 && ent <= 64 )
+ g_cheat.visuals.update_position( ent, *origin );
+ }
+
+ if( strstr( sample, xors( "weapon" ) ) && g_settings.misc.no_sound )
+ volume = 0.f;
+
+ 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 |
