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:
1 parent
2c888d9cd8
commit
7a7d271eef
1 file changed
+1
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user