Fix: Remove ManagedTargets reinitialization in OnModLoad (#93)

Removed the unnecessary reinitialization of ManagedTargets in ModLoad because it removed some of the rendertargets on the mod that loaded before OnModLoad

(cherry picked from commit 70e56bd445884a4f5b914cafadef1cc6f628eaf6)
This commit is contained in:
Wxo authored and Stephen Thiebaud committed 2025-11-13 13:14:11 -06:00
1 parent 2c888d9cd8
commit 7a7d271eef
1 file changed
+1 -3
+1 -3
View File
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
@@ -11,7 +10,7 @@ namespace CalamityMod.Graphics
/// </summary>
public class RenderTargetManager : ModSystem
{
internal static List<ManagedRenderTarget> ManagedTargets = new();
internal static List<ManagedRenderTarget> ManagedTargets = [];
public delegate void RenderTargetUpdateDelegate();
@@ -55,7 +54,6 @@ namespace CalamityMod.Graphics
public override void OnModLoad()
{
ManagedTargets = new();
Main.OnPreDraw += HandleTargetUpdateLoop;
Main.OnResolutionChanged += ResetTargetSizes;
}