IllusionMods / IllusionFixes

A collection of fixes for common issues found in games by Illusion
GNU General Public License v3.0
157 stars 29 forks source link

GarbageTruck: optimize FBSAssist.AudioAssist.GetAudioWaveValue #30

Closed mosirnik closed 3 years ago

mosirnik commented 3 years ago

This method gets called 1-2 times a frame in an H scene.

mosirnik commented 3 years ago

(Force-pushed a fix to a typo in a comment)

mosirnik commented 3 years ago

@ManlyMarco Thanks. I rewrote the code using CodeMatcher. Also I removed the use of [ThreadStatic] because the method being patched is inherently single-threaded (due to the use of a Unity method).