CGameMovement::AirAccelerate( Vector& wishdir, float wishspeed, float accel ): https://github.com/ValveSoftware/source ... .cpp#L1707
Syntax: Select all
from memory import find_binary
from memory import Convention
from memory import DataType
from memory.hooks import PreHook
SERVER = find_binary('server')
AIRACCELERATE = SERVER['_ZN13CGameMovement13AirAccelerateER6Vectorff'].make_function(
Convention.THISCALL,
(DataType.POINTER, DataType.FLOAT, DataType.FLOAT),
DataType.VOID
)
# ACCELERATE = SERVER['_ZN13CGameMovement10AccelerateER6Vectorff'].make_function(
# Convention.THISCALL,
# (DataType.POINTER, DataType.FLOAT, DataType.FLOAT),
# DataType.VOID
#)
@PreHook(AIRACCELERATE)
def pre_hook_airaccelerate(stack_data):
print(stack_data[0])
print(stack_data[1])
print(stack_data[2])
stack_data[0] = _memory.Pointer (CGameMovement::AirAccelerate)
stack_data[1] = NaN
stack_data[2] = wishspeed (CGameMovement::AirAccelerate)
Why did 'wishspeed' and 'accel' switch index places and why is 'accel' NaN