I found out offset from CBaseTrigger to the variable is 0x74. But nothing happen when I set myself pushspeed, it remains the same actually.
CTriggerPush::Touch: https://github.com/ValveSoftware/source ... .cpp#L2242
Syntax: Select all
trigger_push_touch = server_binary['_ZN12CTriggerPush5TouchEP11CBaseEntity'].make_function(
Convention.THISCALL,
(DataType.POINTER, DataType.POINTER),
DataType.VOID
)
@PreHook(trigger_push_touch)
def pre_hook(stack_data):
print(stack_data[0].get_float(0x74)) # Real m_flPushspeed
stack_data[0].set_float(512.0, 0x74) # Changed but it doesn't lead to anything.