Skip to content

Commit 4a85fbc

Browse files
authored
v1.2.1 hotfix
fixes sound issue
2 parents 2617518 + b83d34a commit 4a85fbc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

SingleFile/main.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include <unordered_map>
66
#pragma comment(lib, "minhook")
77
#define IN_RANGE(x,a,b) (x >= a && x <= b)
8-
#define GET_BITS( x ) (IN_RANGE(x,'0','9') ? (x - '0') : ((x&(~0x20)) - 'A' + 0xA))
9-
#define GET_BYTE( x ) (GET_BITS(x[0x0]) << 0x4 | GET_BITS(x[0x1]))
8+
#define GET_BITS(x) (IN_RANGE(x,'0','9') ? (x - '0') : ((x&(~0x20)) - 'A' + 0xA))
9+
#define GET_BYTE(x) (GET_BITS(x[0x0]) << 0x4 | GET_BITS(x[0x1]))
1010
PVOID client_dll = nullptr;
1111
PVOID engine_dll = nullptr;
1212
INT CCSPlayer = 0x28; // ClassID::CCSPlayer = 40;
@@ -87,9 +87,6 @@ struct sconfig {
8787
BOOLEAN m_bDisablePostProcess;
8888
BOOLEAN m_bRankRevealer;
8989
BOOLEAN m_bFlashReducer;
90-
BOOLEAN m_bGlow;
91-
BOOLEAN m_bGlowXQZ;
92-
BOOLEAN m_bGlowTeam;
9390
}visuals;
9491
struct smisc {
9592
BOOLEAN m_bBhop;
@@ -876,9 +873,9 @@ BOOLEAN WINAPI _CreateMove(FLOAT flInputSampleTime, CUserCmd* cmd) {
876873
usespam(cmd);
877874
return SetViewAngles;
878875
}
879-
VOID WINAPI _EmitSound(PVOID pFilter, INT nEntityIndex, INT nChannel, LPCSTR szSoundEntry, DWORD dwHash, LPCSTR szSample, FLOAT flVolume, INT nSeed, INT nSoundLevel, INT nFlags, INT nPitch, const vec3& vecOrigin, const vec3& vecDirection, PVOID pvecOrigins, BOOLEAN bUpdatePos, FLOAT flTime, INT nEntityID, PVOID pSoundParams) { // thank you danielkrupinski/Osiris for these arguments
880-
autoaccept(szSoundEntry);
881-
return EmitSoundOriginal(pFilter, nEntityIndex, nChannel, szSoundEntry, dwHash, szSample, flVolume, nSeed, nSoundLevel, nSoundLevel, nPitch, vecOrigin, vecDirection, pvecOrigins, bUpdatePos, flTime, nEntityID, pSoundParams);
876+
void WINAPI _EmitSound(void* filter, int entityIndex, int channel, const char* soundEntry, unsigned int soundEntryHash, const char* sample, float volume, int seed, int soundLevel, int flags, int pitch, const vec3& origin, const vec3& direction, void* utlVecOrigins, bool updatePositions, float soundtime, int speakerentity, void* soundParams) { // thank you danielkrupinski/Osiris for these arguments
877+
autoaccept(soundEntry);
878+
return EmitSoundOriginal(filter, entityIndex, channel, soundEntry, soundEntryHash, sample, volume, seed, soundLevel, flags, pitch, origin, direction, utlVecOrigins, updatePositions, soundtime, speakerentity, soundParams);
882879
}
883880
BOOLEAN WINAPI _GameEvents(IGameEvent* event) {
884881
if (config.misc.m_bHitSound) {
@@ -932,7 +929,7 @@ VOID WINAPI Init (HMODULE mod) {
932929
AllocConsole();
933930
SetConsoleTitleA("singlefile: console");
934931
freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
935-
printf("singlefile v1.2: loading... (compiled with %d lines of code)\n", GetLineCount());
932+
printf("singlefile v1.2.1: loading... (compiled with %d lines of code)\n", GetLineCount());
936933
csgo_window = FindWindowA("Valve001", nullptr);
937934
orig_proc = (WNDPROC)SetWindowLongA(csgo_window, GWLP_WNDPROC, (LONG)Wndproc);
938935
client_dll = GetModuleHandleA("client.dll");
@@ -941,7 +938,7 @@ VOID WINAPI Init (HMODULE mod) {
941938
PVOID vgui2_dll = GetModuleHandleA("vgui2.dll");
942939
PVOID vstdlib_dll = GetModuleHandleA("vstdlib.dll");
943940
interfaces.engine = CreateInterface<IVEngineClient*>(engine_dll, "VEngineClient014");
944-
if (!strstr(interfaces.engine->GetVersionString(), "1.37.8.6"))
941+
if (!strstr(interfaces.engine->GetVersionString(), "1.37.8.7"))
945942
printf("note: you are using an unknown cs:go client version (%s). if you are experiencing crashes, you may need to update offsets. each offset in the source code has it's netvar name, or you can find it on hazedumper.\n", interfaces.engine->GetVersionString());
946943
interfaces.entitylist = CreateInterface<CBaseEntityList*>(client_dll, "VClientEntityList003");
947944
interfaces.surface = CreateInterface<CMatSystemSurface*>(surface_dll, "VGUI_Surface031");

0 commit comments

Comments
 (0)