SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
Refactor Patches
This commit is contained in:
6 files changed
+11
-7
No files matched your search
@@ -3,12 +3,14 @@ using HarmonyLib;
|
||||
|
||||
namespace ADOFAIRenderer.Patch.Game
|
||||
{
|
||||
[HarmonyPatch(typeof(scrCamera), "SetCustomFrameRate")]
|
||||
[HarmonyPatch(typeof(scrCamera))]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public class scrCameraPatch
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetCustomFrameRate")]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
private static bool Prefix(scrCamera __instance, bool enable, float frame)
|
||||
private static bool FixCamRT(scrCamera __instance, bool enable, float frame)
|
||||
{
|
||||
// There is an issue that `mainTexture.Release` triggers even if `mainTexture` is `camRT`, so mod tries to fix it
|
||||
if (enable || __instance.enableCustomFPS != enable) return true;
|
||||
|
||||
Reference in new issue
Block a user