Skip to content

API: Implement RG_CBasePlayerWeapon_KickBack hook#253

Closed
ShadowsAdi wants to merge 10 commits intorehlds:masterfrom
ShadowsAdi:add-kickback-hook
Closed

API: Implement RG_CBasePlayerWeapon_KickBack hook#253
ShadowsAdi wants to merge 10 commits intorehlds:masterfrom
ShadowsAdi:add-kickback-hook

Conversation

@ShadowsAdi
Copy link
Contributor

Related to: #153

@RauliTop
Copy link
Contributor

Add a description to include please

@RauliTop
Copy link
Contributor

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

@ShadowsAdi
Copy link
Contributor Author

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

@RauliTop
Copy link
Contributor

RauliTop commented Mar 21, 2022

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
Copy link
Contributor

RauliTop commented Mar 21, 2022

@ShadowsAdi
Copy link
Contributor Author

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.

@RauliTop
Copy link
Contributor

@RauliTop
Copy link
Contributor

Now is great!

Time to create the native rg_kickback?

@ShadowsAdi
Copy link
Contributor Author

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.

@s1lentq
Copy link
Member

s1lentq commented Sep 5, 2023

Done #280

@s1lentq s1lentq closed this Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants