[ASM] About UpdateGravity Function Structure

Joined
Apr 23, 2006
Messages
415
Reaction score
45
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.
 
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
 
Upvote 0
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.
 
Upvote 0
Back