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

BUG: Skin changer immediately reverts back to Rico #19

Open
jas0n098 opened this issue Mar 2, 2020 · 3 comments
Open

BUG: Skin changer immediately reverts back to Rico #19

jas0n098 opened this issue Mar 2, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jas0n098
Copy link

jas0n098 commented Mar 2, 2020

Trying the skin command with any model seems to just work for 1 second before reverting back to Rico. Also worth mentioning is if I use Rico's Hero of Solis skin (default), the skin command has no effect at all.

Compiled from commit 85b0a39 (latest as of now) with MSVC 2017 and Windows 8.1 SDK

@aaronkirkham
Copy link
Owner

aaronkirkham commented Mar 2, 2020

Interesting - have not had anyone report any issues with that during testing.

The only thing I can think of right now would be to comment out Character.cpp line 52 to 67, recompile and give it another try.

if (skin_swapper) {
if (skin_swapper->m_currentSkin == skin_swapper->m_defaultSkin) {
for (decltype(model_state->m_modelCount) i = 0; i < model_state->m_modelCount; ++i) {
model_state->m_slot[i].m_modelInstance->m_flags &= 0xFFFFFFEEu;
}
// copy old model info
static CMatrix4f identity{};
hk::func_call<void>(0x147BC1B50, &skin_swapper->m_oldModelState, model_state, &identity,
&character->m_animatedModel.m_animationController->m_skinningPalette);
}
// @NOTE: can be anything just not the default skin hash.
skin_swapper->m_requestedSkin = 0xDEADBEEF;
skin_swapper->m_currentSkin = 0xDEADBEEF;
}

@aaronkirkham aaronkirkham added the bug Something isn't working label Mar 2, 2020
@jas0n098
Copy link
Author

jas0n098 commented Mar 2, 2020

Nice! That did the trick. It no longer reverts to Rico after this change

@aaronkirkham
Copy link
Owner

Ok, thanks for testing that. I will leave this issue open for now and will take another look at that part later and try to figure out what is going on there/how to reproduce what you experienced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants