Advertisement
expired6978

QueueNiNodeUpdate

Aug 15th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.04 KB | None | 0 0
  1. int __thiscall Character__QueueNiNodeUpdate(Character *this, bool unk1)
  2. {
  3.   int result; // eax@1
  4.   Character *v3; // edi@1
  5.   volatile LONG **v4; // eax@4
  6.   void *v5; // esi@4
  7.   int v6; // esi@4
  8.   void *v7; // esi@8
  9.   volatile LONG **v8; // eax@8
  10.   volatile LONG **v9; // eax@9
  11.   int v10; // ebx@17
  12.   void *v11; // [sp+10h] [bp+8h]@6
  13.  
  14.   v3 = this;
  15.   result = TESObjectREFR__GetNiNode(this);
  16.   if ( result )
  17.   {
  18.     if ( unk1 )
  19.     {
  20.       if ( v3 == LODWORD(g_player2) )
  21.       {
  22.         v4 = (volatile LONG **)((int (__stdcall *)(_DWORD, int))g_player->baseclass_0.baseclass_0.baseclass_0.baseclass_0.baseclass_0.vfptr[31].ReleaseRefs)(
  23.                                  0,
  24.                                  v6);
  25.         v5 = *v4;
  26.         if ( *v4 )
  27.           InterlockedIncrement(*v4);
  28.         v11 = v5;
  29.         if ( v5 != 0 ? (int)sub_A51DE0 : 0 )
  30.           ActorWeightModel__UpdateWeightData(v5);
  31.         v8 = (volatile LONG **)((int (__cdecl *)(signed int))g_player->baseclass_0.baseclass_0.baseclass_0.baseclass_0.baseclass_0.vfptr[31].ReleaseRefs)(1);
  32.         sub_4145F0(&unk1, v8);
  33.         v7 = (void *)unk1;
  34.       }
  35.       else
  36.       {
  37.         v9 = (volatile LONG **)((int (__thiscall *)(Character *))v3->baseclass_0.baseclass_0.baseclass_0.baseclass_0.vfptr[31].CopyFromBase)(v3);
  38.         v7 = *v9;
  39.         if ( *v9 )
  40.           InterlockedIncrement(*v9);
  41.       }
  42.       if ( v7 != 0 ? (int)sub_A51DE0 : 0 )
  43.         ActorWeightModel__UpdateWeightData(v7);
  44.       if ( v7 )
  45.       {
  46.         if ( !InterlockedDecrement((volatile LONG *)v7) )
  47.         {
  48.           sub_46DAA0(v7);
  49.           Heap__Free((int)&g_heap, v7, 0);
  50.         }
  51.       }
  52.     }
  53.     if ( IsTaskThreadBusy() )
  54.     {
  55.       result = sub_6A3B30(g_bsTaskPool, v10, (int)v3);
  56.     }
  57.     else
  58.     {
  59.       ActorEquipData__SetEquipFlag(0x17u);
  60.       ActorEquipData__UpdateEquipment(v3->baseclass_0.unk080[2], &v3->baseclass_0);
  61.       result = sub_6AE350(v3);
  62.       if ( !result )
  63.         result = sub_6FD1A0(v3->baseclass_0.unk080[2], 0);
  64.     }
  65.   }
  66.   return result;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement