Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Player/Knife model changer #602

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Add Player/Knife model changer #602

wants to merge 10 commits into from

Conversation

ef3d0c3e
Copy link

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.

@ghost
Copy link

ghost commented Dec 11, 2020

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

@ghost
Copy link

ghost commented Dec 11, 2020

Duuuuuude... You are breathtaking 😄

@ef3d0c3e
Copy link
Author

ef3d0c3e commented Dec 11, 2020

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).

@ghost
Copy link

ghost commented Dec 11, 2020

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

@LWSS
Copy link
Owner

LWSS commented Dec 12, 2020

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

@ef3d0c3e
Copy link
Author

ef3d0c3e commented Dec 12, 2020

@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).

@koutsie
Copy link

koutsie commented Dec 27, 2020

lgtm(?)

@FilipeSilvens
Copy link
Collaborator

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

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.

4 participants