[ASM] About UpdateGravity Function Structure

Results 1 to 9 of 9
  1. #1
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    [ASM] About UpdateGravity Function Structure

    Hello guys, im trying to code a dll as you can see i've posted it at Gunz Developent, but i still have some questions about the structure of Gunz's ZModule_Movable::UpdateGravity function:

    I'm currentlly caling it this way:

    Putting the function adress at ecx register
    Pushing the Gravity value i wanna set
    Calling ecx (the function itself)

    This is causing my game to crash. Is there any other argument i need to store before calling the function? Such as Character id ore something? Thanks.


  2. #2
    Account Upgraded | Title Enabled! shortymant is offline
    MemberRank
    Nov 2008 Join Date
    606Posts

    Re: [ASM] About UpdateGravity Function Structure

    did you hook gunz?

  3. #3
    Account Upgraded | Title Enabled! Mr.Lucifer is offline
    MemberRank
    Apr 2007 Join Date
    797Posts

    Re: [ASM] About UpdateGravity Function Structure

    It's just that float value.
    ?UpdateGravity@ZModule_Movable@@QAEXM@Z(public: void __thiscall ZModule_Movable::UpdateGravity(float))

  4. #4
    Proficient Member -Lambda- is offline
    MemberRank
    Jan 2007 Join Date
    SpainLocation
    157Posts

    Re: [ASM] About UpdateGravity Function Structure

    It crash because you are calling it in another thread.

    Hook ZCharacter::GetGravityConst or something like that and return the float.

  5. #5
    Account Upgraded | Title Enabled! belette321 is offline
    MemberRank
    Jan 2007 Join Date
    Canada, QuebecLocation
    361Posts

    Re: [ASM] About UpdateGravity Function Structure

    Lamba why are you so pro ?

  6. #6
    Account Upgraded | Title Enabled! Torrentspy is offline
    MemberRank
    Sep 2008 Join Date
    256Posts

    Re: [ASM] About UpdateGravity Function Structure

    I know its pro, but cant do it xD

  7. #7
    Sultan of Yolo Demantor is offline
    MemberRank
    May 2008 Join Date
    GermanyLocation
    1,266Posts

    Re: [ASM] About UpdateGravity Function Structure

    Quote Originally Posted by belette321 View Post
    Lamba why are you so pro ?
    if this is really Lambda, then yeh, lambda is so pro in all, no reason, just pro xD

  8. #8
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: [ASM] About UpdateGravity Function Structure

    Quote Originally Posted by -Lambda- View Post
    It crash because you are calling it in another thread.

    Hook ZCharacter::GetGravityConst or something like that and return the float.
    So i need to hook that function and change it's value? So the update gravity function will stay with no hooking, just reading the edited float returned by the GetGravity function? Do you have any idea if this function is static something like, when you start gunz it just get the value once or i will need to keep editing it value more times? Thx for the help Lambda =D

  9. #9
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: [ASM] About UpdateGravity Function Structure

    Quote Originally Posted by cerealnp View Post
    So i need to hook that function and change it's value? So the update gravity function will stay with no hooking, just reading the edited float returned by the GetGravity function? Do you have any idea if this function is static something like, when you start gunz it just get the value once or i will need to keep editing it value more times? Thx for the help Lambda =D
    return false if you don't want the gravity, return true if you do. Use the .Ret of Lance's CDetour.



Advertisement