Zignixx / cs2_weapons_skin

5 stars 5 forks source link

Old gun models #1

Open Zignixx opened 10 months ago

Zignixx commented 10 months ago

The solution is very simple, if the skin uses the old gun model, you have to call SetMeshGroupMask with meshGroupMask=2 on both the weapon and the view model.

SetMeshGroupMask takes the CGameSceneNode/CSkeletonInstance pointer and meshGroupMask as parameters. Code: E8? ? ? ? 8B 45 D0 48 8B 55 D8 (relative)

https://github.com/bruhmoment21/cs2-sdk/blob/18fb2f4931c755101207bf4c5914d40842ab7587/cs2cheat/src/game/skins/skin_changer.cpp#L82-L83

bklol commented 9 months ago

its better call https://github.com/bruhmoment21/cs2-sdk/blob/18fb2f4931c755101207bf4c5914d40842ab7587/cs2cheat/src/game/skins/skin_changer.cpp#L74 and plus 1 passing to meshGroupMask。the sig is easy to find,search any string like “ak47”, and you will find a very long function contain many skin name in it。can simply call with IsUsingLegacyModel(const char *Paint),the function check the weapon paint name belong to old or new weapon model。