Advertisement
expired6978

precache disable

Mar 18th, 2013
1,974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. #include "skse/PluginAPI.h"
  2. #include "skse/skse_version.h"
  3. #include "skse/SafeWrite.h"
  4. #include "skse/GameAPI.h"
  5. #include <shlobj.h>
  6.  
  7. IDebugLog   gLog;
  8.  
  9. PluginHandle    g_pluginHandle = kPluginHandle_Invalid;
  10.  
  11. void GameplayPatches(void)
  12. {
  13.     WriteRelJump(0x00886A80, 0x00886AEE); // Disable PrecacheCharGen
  14.     WriteRelJump(0x00886D10, 0x00886D81); // Disable PrecacheCharGenClear
  15. }
  16.  
  17. extern "C"
  18. {
  19.  
  20. bool SKSEPlugin_Query(const SKSEInterface * skse, PluginInfo * info)
  21. {
  22.     gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Skyrim\\SKSE\\skse_disablefacengencache.log");
  23.     _MESSAGE("skse_disablefacengencache");
  24.  
  25.     // populate info structure
  26.     info->infoVersion = PluginInfo::kInfoVersion;
  27.     info->name =        "disablefacengencache";
  28.     info->version =     1;
  29.  
  30.     // store plugin handle so we can identify ourselves later
  31.     g_pluginHandle = skse->GetPluginHandle();
  32.  
  33.     if(skse->isEditor)
  34.     {
  35.         _MESSAGE("loaded in editor, marking as incompatible");
  36.  
  37.         return false;
  38.     }
  39.     else if(skse->runtimeVersion != RUNTIME_VERSION_1_9_29_0)
  40.     {
  41.         _MESSAGE("unsupported runtime version %08X", skse->runtimeVersion);
  42.  
  43.         return false;
  44.     }
  45.  
  46.     // supported runtime version
  47.     return true;
  48. }
  49.  
  50. bool SKSEPlugin_Load(const SKSEInterface * skse)
  51. {
  52.     _MESSAGE("Precaching Disabled");
  53.  
  54.     // apply patches to the game here
  55.     GameplayPatches();
  56.     return true;
  57. }
  58.  
  59. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement