From c65c93023a44ca25863f3dbec025e5d76fea0630 Mon Sep 17 00:00:00 2001 From: dymanoid <9433345+dymanoid@users.noreply.github.com> Date: Sat, 8 Jun 2019 02:37:21 +0200 Subject: [PATCH] Revert patches before cleaning up to avoid exceptions --- src/RealTime/Core/RealTimeCore.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RealTime/Core/RealTimeCore.cs b/src/RealTime/Core/RealTimeCore.cs index 75440d2..bd772c2 100644 --- a/src/RealTime/Core/RealTimeCore.cs +++ b/src/RealTime/Core/RealTimeCore.cs @@ -234,6 +234,9 @@ namespace RealTime.Core return; } + Log.Info("The 'Real Time' mod reverts method patches."); + patcher.Revert(); + ResidentAIPatch.RealTimeAI = null; TouristAIPatch.RealTimeAI = null; BuildingAIPatch.RealTimeAI = null; @@ -251,9 +254,6 @@ namespace RealTime.Core OutsideConnectionAIPatch.SpareTimeBehavior = null; CitizenManagerPatch.NewCitizenBehavior = null; - Log.Info("The 'Real Time' mod reverts method patches."); - patcher.Revert(); - vanillaEvents.Revert(); timeAdjustment.Disable(); -- GitLab