Results 1 to 8 of 8
  1. #1
    Farah[Aisyah]'s Avatar
    Join Date
    Jan 2013
    Gender
    female
    Location
    <------> ◕‿◕ <------>
    Posts
    677
    Reputation
    98
    Thanks
    11,042
    My Mood
    Angelic

    Post No Recoil and Spread

    credit:IChooseYou

    So here is an easy way to do no recoil and no spread with absolutely no reversing of classes.

    Make your type definition:

    PHP Code
    Code:
    typedef const void * ( __fastcall* tGetRecoil )( void *thisptr, void *unknown, void *a2, char a3 );
    
    const void* __fastcall hkGetRecoil( void *thisptr, void *unknown, void *a2, char a3 );
    tGetRecoil oGetRecoil = NULL;
    Do hook

    PHP Code
    Code:
    //I'm lazy, so this is an easy way to backup the function
    oGetRecoil = (tGetRecoil)DetourFunction( (BYTE*)0x0077B350, (BYTE*)&hkGetRecoil );
    //Retour so you won't get kicked (just copies over 6 bytes)
    memcpy_safe_retour( (BYTE *)0x0077B350, (BYTE *)"\x55\x8B\xEC\x83\xE4\xF0" );
    //Hook here (copies 4 bytes -> address off hkGetRecoil)
    memcpy_safe_dword( (BYTE *)0x2096D54, (BYTE *)hkGetRecoil );
    To explain the above code, DetourFunction will back up all the bytes for you, so you can call the original function.
    However, detours will overwrite the first 6 bytes and PB will kick you for corrupted memory.
    To avoid that, we retour, (put in the original 6 bytes)
    Then we can hook in another spot, where PB doesn't scan.

    PHP Code
    Code:
    const void* __fastcall hkGetRecoil( void *thisptr, void *unknown, void *a2, char a3 )
    {
        __asm pushad;
    
    //just an example, the class is exactly the same as in the PDB no reversing equired
    //thisptr = fb::GunSway
    //if you have class from my other post you can type cast it
    //fb::GunSway* gunSway = (fb::GunSway *)thisptr;
    
    
        DWORD fb__gunSway = (DWORD )thisptr;
    
        *( float *)( fb__gunSway + 0xAC ) = 0.0f; //m_DeviationPitch
        *( float *)( fb__gunSway + 0xB0 ) = 0.0f; //m_DeviationYaw
        *( float *)( fb__gunSway + 0xB4 ) = 0.0f; //m_DeviationRoll
        *( float *)( fb__gunSway + 0xB8 ) = 0.0f; //m_DeviationTransY
    
        *( float *)( fb__gunSway + 0x120 ) = 0.0f; //m_dispersionAngle
        *( float *)( fb__gunSway + 0x124 ) = 0.0f; //m_DeviationPitch
    
        *( float *)( fb__gunSway + 0x13C ) = 0.00001f; //m_currentGameplayDeviationScaleFactor
        *( float *)( fb__gunSway + 0x140 ) = 0.00001f; //m_currentVisualDeviationScaleFactor
    
        *( float *)( fb__gunSway + 0x15C ) = 0.00001f; //m_randomAngle
        *( float *)( fb__gunSway + 0x160 ) = 0.00001f; //m_randomRadius
    
        __asm popad;
    
        return oGetRecoil( thisptr, unknown, a2, a3 );
    }
    edit: made is less black, explained more
    Last edited by Farah[Aisyah]; 02-27-2013 at 05:43 PM.

  2. #2
    w4ssup's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    1,434
    Reputation
    10
    Thanks
    318
    yea i dont even know how to use this...

  3. The Following User Says Thank You to w4ssup For This Useful Post:

    CesarMora (03-25-2013)

  4. #3
    Dovahkiiin's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0
    My Mood
    Shocked
    Dat copy & paste without credits AGAIN

    I don't like you

  5. #4
    Margherita's Avatar
    Join Date
    Jan 2011
    Gender
    female
    Posts
    11,306
    Reputation
    783
    Thanks
    1,282
    My Mood
    Bashful
    Thanks for sharing
    PM Me | VM Me | Rules

    MARGHERITA

  6. #5
    Maximatum99's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    Keep up the lazy whoring with your repeated pasta.

  7. #6
    gesha's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    1
    STUPID WOMAN JUST FUCKING GIVE THE DAMN CREDITS

  8. The Following User Says Thank You to gesha For This Useful Post:

    Kickazz080 (02-27-2013)

  9. #7
    Elektrosadist's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    effin dipshit give credits or stop posting. This was made by Shrooms aka IchooseYou. Not by the asshole operator making all these threads without understanding any of it.

    If this forum would be moderated in any kind of way mods should start to remove his/her posts.

  10. #8
    Threadstarter
    Life is wasted on the living ◕‿◕
    MPGH Member
    Farah[Aisyah]'s Avatar
    Join Date
    Jan 2013
    Gender
    female
    Location
    <------> ◕‿◕ <------>
    Posts
    677
    Reputation
    98
    Thanks
    11,042
    My Mood
    Angelic
    Quote Originally Posted by Elektrosadist View Post
    effin dipshit give credits or stop posting. This was made by Shrooms aka IchooseYou. Not by the asshole operator making all these threads without understanding any of it.

    If this forum would be moderated in any kind of way mods should start to remove his/her posts.
    ??

Similar Threads

  1. What functions are responsible of recoil and spread?
    By mruize85 in forum Alliance of Valiant Arms (AVA) Coding / Source Code
    Replies: 6
    Last Post: 09-26-2012, 04:58 PM
  2. [Source Code] Crossfire NA No Recoil and Spread
    By codex07 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 15
    Last Post: 09-24-2012, 11:10 AM
  3. The recoil and spread in this game is....
    By QuarterBack in forum CrossFire Discussions
    Replies: 18
    Last Post: 02-02-2011, 05:26 AM
  4. Does any1 have a 1 hit ko hack or no recoil and spread?
    By ajt in forum CrossFire Hacks & Cheats
    Replies: 10
    Last Post: 07-09-2009, 01:19 AM
  5. How to find Recoil and Spread addresses?
    By V1olATor in forum WarRock - International Hacks
    Replies: 5
    Last Post: 04-20-2007, 10:50 AM