Advertisement
expired6978

Untitled

Jan 31st, 2013
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1.     class TintUpdate : public UIDelegate
  2.     {
  3.     public:
  4.         TintUpdate() {}
  5.         virtual void Run()
  6.         {
  7.             UpdatePlayerTints();
  8.         }
  9.         virtual void    Dispose(void){}
  10.     };
  11.  
  12.     void UpdateTintMaskColors(StaticFunctionTag * base)
  13.     {
  14.         PlayerCharacter* pPC = (*g_thePlayer);
  15.         if(pPC) {
  16.             TintMask * tintMask = CALL_MEMBER_FN(pPC, GetTintMask)(TintMask::kMaskType_SkinTone, 0);
  17.             if(tintMask) {
  18.                 NiColorA val;
  19.                 val.r = tintMask->color.red / 255.0;
  20.                 val.g = tintMask->color.green / 255.0;
  21.                 val.b = tintMask->color.blue / 255.0;
  22.                 NiColorA * color = &val;
  23.                 if(pPC->loadedState && pPC->loadedState->node) {
  24.                     UpdateModelSkin(pPC->loadedState->node, &color); // Update for 3rd Person
  25.                 }
  26.                 if(pPC->firstPersonSkeleton) {
  27.                     UpdateModelSkin(pPC->firstPersonSkeleton, &color); // Update for 1st Person
  28.                 }
  29.             }
  30.  
  31.             //UpdatePlayerTints();
  32.             UIManager * uiManager = UIManager::GetSingleton();
  33.             if (!uiManager)
  34.                 return;
  35.  
  36.             uiManager->QueueCommand(new TintUpdate());
  37.         }
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement