open up main.cpp and search for:
Code: |
//GenericPatch soundPatch; |
you will see these lines under that
Code: |
//static void* stackret=0; //static DWORD sound_reloc_addr1=0; //void PreS_DynamicSound(const DWORD a,const DWORD entindex,const DWORD c,const char*const sample,const float*const origin,DWORD f,const DWORD g,const DWORD h); |
now what u need to do is uncomment them all so make it look like
Code: |
GenericPatch soundPatch; static void* stackret=0; static DWORD sound_reloc_addr1=0; void PreS_DynamicSound(const DWORD a,const DWORD entindex,const DWORD c,const char*const sample,const float*const origin,DWORD f,const DWORD g,const DWORD h); |
now scroll down untill u see:
Code: |
/*__declspec(naked) void JumpGate_DynamicSound() { __asm{ // 8 args on stack call PreS_DynamicSound;
// exec caller instructions & jump back sub esp,0x48; mov eax, soundPatch.patchloc; add eax, soundPatch.patchsize; push eax; mov eax,sound_reloc_addr1; mov eax,[eax];
ret; } } */ |
make it look like this
Code: |
__declspec(naked) void JumpGate_DynamicSound() { __asm{ // 8 args on stack call PreS_DynamicSound;
// exec caller instructions & jump back sub esp,0x48; mov eax, soundPatch.patchloc; add eax, soundPatch.patchsize; push eax; mov eax,sound_reloc_addr1; mov eax,[eax];
ret; } } |
then u will see:
Code: |
/*bool detour_S_DynamicSound() { static bool applied = false; if( applied ) { return true; } applied = true; //assert(stackret);
BYTE* offs = (BYTE*)0x01D955E0; BYTE* sig = (BYTE*)"x83xECx48xA1x00x00x00x00"; char* mask = "xxxx????";
if(!soundPatch.find_location(offs,sig,mask)) { OGCmessage("&bSound Patch Failed!", stackret); return false; } // prepare patch: soundPatch.patchdata[0]=0x68; *(DWORD*)(soundPatch.patchdata+1) = (DWORD)JumpGate_DynamicSound; soundPatch.patchdata[5]=0xC3; soundPatch.patchdata[6]=0x90; soundPatch.patchdata[7]=0x90;
// relocated addr needed in detour sound_reloc_addr1 = *(DWORD*)(soundPatch.backup+4);
soundPatch.apply(); OGCmessage( "&bSound Patch Applied Successfully!\n"); return true; } */ |
make it look like this:
Code: |
bool detour_S_DynamicSound() { static bool applied = false; if( applied ) { return true; } applied = true; //assert(stackret);
BYTE* offs = (BYTE*)0x01D955E0; BYTE* sig = (BYTE*)"x83xECx48xA1x00x00x00x00"; char* mask = "xxxx????";
if(!soundPatch.find_location(offs,sig,mask)) { OGCmessage("&bSound Patch Failed!", stackret); return false; } // prepare patch: soundPatch.patchdata[0]=0x68; *(DWORD*)(soundPatch.patchdata+1) = (DWORD)JumpGate_DynamicSound; soundPatch.patchdata[5]=0xC3; soundPatch.patchdata[6]=0x90; soundPatch.patchdata[7]=0x90;
// relocated addr needed in detour sound_reloc_addr1 = *(DWORD*)(soundPatch.backup+4);
soundPatch.apply(); OGCmessage( "&bSound Patch Applied Successfully!\n"); return true; } |
now for the offset change all u have to do is change this part
Code: |
BYTE* offs = (BYTE*)0x01D955E0; |
( this offset pertains to 3/23/04 )
now open up client.cpp and go down to your onlyhook function
you will see this:
Code: |
//bool detour_S_DynamicSound(); //detour_S_DynamicSound(); |
uncomment them and make it look like
Code: |
bool detour_S_DynamicSound(); detour_S_DynamicSound(); |
now for ur hacks cfg just use these:
sounddisplay 2
soundfilter 4 // 0=no sound markers 1=non-visible players 2=cur aiming team 3=all players
soundtol 200 // max distance from sound origin to entity. 200 worx best
soundtime 1.0 // how long sound markers stay
soundmax 10 // maximum number of sound markers displayed