reapi icon indicating copy to clipboard operation
reapi copied to clipboard

`API`: Implement `RG_CBasePlayerWeapon_KickBack` hook

Open ShadowsAdi opened this issue 2 years ago • 9 comments

Related to: https://github.com/s1lentq/reapi/issues/153

ShadowsAdi avatar Mar 20 '22 15:03 ShadowsAdi

Add a description to include please

RauliTop avatar Mar 20 '22 21:03 RauliTop

That description is not true, kickback is the recoil of weapon.

A description example could be: called when attacker fires a weapon. Used to change weapon's recoil.

Also, the issue you mention is about create a native. Not the hook

RauliTop avatar Mar 21 '22 18:03 RauliTop

That description is not true, kickback is the recoil of weapon.

A description example could be: called when attacker fires a weapon. Used to change weapon's recoil.

Also, the issue you mention is about create a native. Not the hook

KickBack is not the recoil of the weapon. The recoil of a weapon is it's punchangles.

See https://github.com/s1lentq/ReGameDLL_CS/blob/master/regamedll/dlls/wpn_shared/wpn_ak47.cpp#L156-L172. Weapons which have a KickBack in GameDLL: AK47, AUG, FAMAS, GALIL, M249, M4A1, MAC10, MP5NAVY, P90, SG552, TMP, UMP45

ShadowsAdi avatar Mar 21 '22 18:03 ShadowsAdi

KickBack is not the recoil of the weapon. The recoil of a weapon is it's punchangles.

See https://github.com/s1lentq/ReGameDLL_CS/blob/master/regamedll/dlls/wpn_shared/wpn_ak47.cpp#L156-L172. Weapons which have a KickBack in GameDLL: AK47, AUG, FAMAS, GALIL, M249, M4A1, MAC10, MP5NAVY, P90, SG552, TMP, UMP45

You just gave me the reason.

punchangles are being changed at Kickback. So, Kickback is what I said, the weapon's recoil. https://github.com/s1lentq/ReGameDLL_CS/blob/67cc153f5d0abab1e42b32a83ef4a470c8781a5c/regamedll/dlls/weapons.cpp#L692-L734

RauliTop avatar Mar 21 '22 19:03 RauliTop

Called when a weapon bullet knocks an enemy. You are confusing kickback to knockback: https://github.com/s1lentq/ReGameDLL_CS/blob/f050be77db474e45c2f525c396f30e33a48e8186/regamedll/dlls/player.cpp#L1144-L1152

RauliTop avatar Mar 21 '22 19:03 RauliTop

Called when a weapon bullet knocks an enemy. You are confusing kickback to knockback: https://github.com/s1lentq/ReGameDLL_CS/blob/f050be77db474e45c2f525c396f30e33a48e8186/regamedll/dlls/player.cpp#L1144-L1152

Yes, you're right. Gotta change the description.

ShadowsAdi avatar Mar 21 '22 19:03 ShadowsAdi

punchangles on Victim are changed at TraceAttack: https://github.com/s1lentq/ReGameDLL_CS/blob/f050be77db474e45c2f525c396f30e33a48e8186/regamedll/dlls/player.cpp#L641-L719

RauliTop avatar Mar 21 '22 19:03 RauliTop

Now is great!

Time to create the native rg_kickback?

RauliTop avatar Mar 21 '22 19:03 RauliTop

Now is great!

Time to create the native rg_kickback?

After the RG hook will be implemented, I will take some time to make this too.

ShadowsAdi avatar Mar 21 '22 19:03 ShadowsAdi

Done #280

s1lentq avatar Sep 05 '23 23:09 s1lentq