For example mp_the_extreme sets g_knockback. Script is nuked now, but could be used if it sets a client dvar instead.
Then, we can modify PlayerCmd_finishPlayerDamage in _g_client_script_cmd_mp.asm line 1380:
mov eax, g_knockback // Move g_knockback as cvar_t* into eax
mov eax, [eax] // Grab contents of pointer
cvtsi2ss xmm0, edx // Unsure what edx is at this point, but it will be used to get multiplied with knockback factor
mulss xmm0, [eax+0xc] // Multiply whatever was in xmm0 with value of g_knockback
divss xmm0, dword [_float_250_00000000] // Divide result by 250
movaps xmm1, xmm0 // Move result into xmm1
mulss xmm1, [ebp-0x38] // Don't know what's in ebp at this point
movaps xmm2, xmm0
mulss xmm2, [ebp-0x34]
lea eax, [esi+0x28]
mulss xmm0, [ebp-0x3c]
addss xmm0, [esi+0x28]
movss [esi+0x28], xmm0
For example mp_the_extreme sets g_knockback. Script is nuked now, but could be used if it sets a client dvar instead. Then, we can modify PlayerCmd_finishPlayerDamage in _g_client_script_cmd_mp.asm line 1380: