Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TintUpdate : public UIDelegate
- {
- public:
- TintUpdate() {}
- virtual void Run()
- {
- UpdatePlayerTints();
- }
- virtual void Dispose(void){}
- };
- void UpdateTintMaskColors(StaticFunctionTag * base)
- {
- PlayerCharacter* pPC = (*g_thePlayer);
- if(pPC) {
- TintMask * tintMask = CALL_MEMBER_FN(pPC, GetTintMask)(TintMask::kMaskType_SkinTone, 0);
- if(tintMask) {
- NiColorA val;
- val.r = tintMask->color.red / 255.0;
- val.g = tintMask->color.green / 255.0;
- val.b = tintMask->color.blue / 255.0;
- NiColorA * color = &val;
- if(pPC->loadedState && pPC->loadedState->node) {
- UpdateModelSkin(pPC->loadedState->node, &color); // Update for 3rd Person
- }
- if(pPC->firstPersonSkeleton) {
- UpdateModelSkin(pPC->firstPersonSkeleton, &color); // Update for 1st Person
- }
- }
- //UpdatePlayerTints();
- UIManager * uiManager = UIManager::GetSingleton();
- if (!uiManager)
- return;
- uiManager->QueueCommand(new TintUpdate());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement