Fuzion icon indicating copy to clipboard operation
Fuzion copied to clipboard

Add Player/Knife model changer

Open ef3d0c3e opened this issue 5 years ago • 9 comments

I added a knife/player model changer. This is a must have for 31337 animu playerz.

I hooked FindMDL (not using it currently, just thought it could be useful). You can load any model in your CSGO folder (custom models too), using the PrecacheModels function.

screenshot Here is a video of it in action: video

I put the model changing code in FrameStageNotify (I legitimately don't know the best location). So you may notice some flicker (though rare). However, there could be some issues with SetupBones and incorrect models.

Currently, you can only change the T/CT player and knife model, may move it in the skinchanger window and allow changing all weapon types. And you have to press the "Update" button (in the model tab) in order to see the models, this may be changed in the future.

The reason I'm not using FindMDL, is because putting an incorrect skin will fuck up the bone matrix. And you need to restart the game to see the changes. Also FindMDL will replace ALL instances of the model with your custom model (i.e change all AK47 to your epic ak47 model from gamebanana), while SetModelIndex allows us to change the models individually.

Also, I fucked up git and forgot to create a new branch before working on this. If you need me to remove the crouchblock code, in order to merge this commit, just tell me.

ef3d0c3e avatar Dec 11 '20 14:12 ef3d0c3e

Haha. Looks good. Very neat and organized commits aswell. I hope @LWSS will accept this.

ghost avatar Dec 11 '20 15:12 ghost

Duuuuuude... You are breathtaking :smile:

ghost avatar Dec 11 '20 15:12 ghost

Thank you for your comments. I'm currently looking for a way to detect map changes (to make it so the models are cached once again when changing maps).

ef3d0c3e avatar Dec 11 '20 15:12 ef3d0c3e

If you join the discord for MissedIT/EyeHook some of the people in there may be able to help you with your goal.

ghost avatar Dec 11 '20 15:12 ghost

Thank you for your comments. I'm currently looking for a way to detect map changes (to make it so the models are cached once again when changing maps).

Try this: https://github.com/LWSS/Fuzion/blob/master/src/Hooks/LevelInitPostEntity.cpp

LWSS avatar Dec 12 '20 00:12 LWSS

@LWSS Thanks, the models are now working when changing maps. I also fixed a bug that would sometime require you to click the "Update" button twice to make the models appear. Also, you can now manually type in model name, which means that you can use models that are already in the game. image

There is still an issue with ImGui and the game's framerate. ImGui's framerate is tied to the game's framerate, which means that editing text and double clicking (required for the file picker) is a pain when your games has high fps. I personally change fps_max to 60 when changing models. (I think this did not happen in the past, maybe due to the uptated ImGui).

ef3d0c3e avatar Dec 12 '20 08:12 ef3d0c3e

lgtm(?)

koutsie avatar Dec 27 '20 22:12 koutsie

just wanna say that this will most likely mess up the prebuilt bonemaps

FilipeSilvens avatar Jan 21 '21 09:01 FilipeSilvens