Advertisement
MarrKoo

q_pass_out_fix.lua

Aug 20th, 2022 (edited)
567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. --the filename must start with "Q", e.g. "q_pass_out_fix.lua"
  2.  
  3. if not SearchModeAPI then return end -- the framework is required
  4.  
  5. local old_passing = passingOutRoutine
  6. if not old_passing then return end -- no need to contonue if the mod doesn't exist
  7.  
  8. SearchModeAPI.Register("passout", -50) -- priority = -50
  9.  
  10. --replace the function from "pass out" mod.
  11. function passingOutRoutine()
  12.     SearchModeAPI.Lock("passout")
  13.     SearchModeAPI.Activate("passout")
  14.     old_passing()
  15.     SearchModeAPI.Deactivate("passout")
  16. end
  17.  
  18. --another injection
  19. local old_pass = passOutRoutine
  20. function passOutRoutine()
  21.     SearchModeAPI.Unlock("passout")
  22.     return old_pass()
  23. end
  24.  
  25. -- Remember that it's not 100% accurate patch. Lock/Unlock should be paired!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement