fastman92

IPLsectionLimits::SetInteriorOccluders

Feb 8th, 2015
240
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // IPL: interior occluders
  2.     void IPLsectionLimits::SetInteriorOccluders(int iInteriorOccluders)
  3.     {
  4.         // CPatch::EnableDebugMode();
  5.  
  6.         if (CPatch::IsDebugModeActive())
  7.             iInteriorOccluders = 40;
  8.         else if (iInteriorOccluders > 40)
  9.             COcclusion__aInteriorOccluders = new tOcclusionBox[iInteriorOccluders];
  10.  
  11.         InteriorOccludersLimit = iInteriorOccluders;
  12.  
  13.         // Patch references to COcclusion::aInteriorOccluders
  14.         #if TRUE
  15.         CPatch::PatchPointer(0x71DF8C + 3, COcclusion__aInteriorOccluders); // mov     word ptr ds:_ZN10COcclusion18aInteriorOccludersE.midX[esi], ax; COcclusion::aInteriorOccluders
  16.         CPatch::PatchPointer(0x71DFA2 + 3, &COcclusion__aInteriorOccluders->midY);  // mov     ds:_ZN10COcclusion18aInteriorOccludersE.midY[esi], ax
  17.         CPatch::PatchPointer(0x71DFB2 + 3, &COcclusion__aInteriorOccluders->midZ);  // mov     ds:_ZN10COcclusion18aInteriorOccludersE.midZ[esi], ax
  18.         CPatch::PatchPointer(0x71DFC8 + 3, &COcclusion__aInteriorOccluders->widthY);    // mov     ds:_ZN10COcclusion18aInteriorOccludersE.widthY[esi], ax
  19.         CPatch::PatchPointer(0x71DFDE + 3, &COcclusion__aInteriorOccluders->widthX);    // mov     ds:_ZN10COcclusion18aInteriorOccludersE.widthX[esi], ax
  20.         CPatch::PatchPointer(0x71DFFA + 3, &COcclusion__aInteriorOccluders->height);    // mov     ds:_ZN10COcclusion18aInteriorOccludersE.height[esi], ax
  21.         CPatch::PatchPointer(0x71E010 + 2, &COcclusion__aInteriorOccluders->rotation3); // mov     ds:_ZN10COcclusion18aInteriorOccludersE.rotation3[esi], al
  22.         CPatch::PatchPointer(0x71E025 + 2, &COcclusion__aInteriorOccluders->rotation2); // mov     ds:_ZN10COcclusion18aInteriorOccludersE.rotation2[esi], al
  23.         CPatch::PatchPointer(0x71E031 + 2, &COcclusion__aInteriorOccluders->rotation);  // mov     ds:_ZN10COcclusion18aInteriorOccludersE.rotation[esi], al
  24.         CPatch::PatchPointer(0x7203FE + 1, COcclusion__aInteriorOccluders); // mov     ebx, offset _ZN10COcclusion18aInteriorOccludersE; COcclusion::aInteriorOccluders
  25.         #endif
  26.  
  27.         CGenericLogStorage::SaveFormattedTextLn("Modified limit of IPL:interior occluders to: %d", InteriorOccludersLimit);
  28.         CGenericLogStorage::WriteLineSeparator();
  29.  
  30.         CPatch::DisableDebugMode();
  31.     }
RAW Paste Data