From f1d5dc495db4e9230aba9f6fca4bf7541875ea73 Mon Sep 17 00:00:00 2001 From: Mishiro Usui Date: Sun, 3 Sep 2023 16:33:30 +0100 Subject: [PATCH] sanity check for psa/psc rocktype --- Projectiles/Summon/MiniGuardianRock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/MiniGuardianRock.cs b/Projectiles/Summon/MiniGuardianRock.cs index bf19a37586..fe873f464c 100644 --- a/Projectiles/Summon/MiniGuardianRock.cs +++ b/Projectiles/Summon/MiniGuardianRock.cs @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { bool psc = Owner.Calamity().profanedCrystalBuffs; - int rockType = (int)Projectile.ai[2]; + int rockType = (int)MathHelper.Clamp(Projectile.ai[2], 1f, 6f);; Texture2D texture = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedRocks" + rockType.ToString()).Value; Vector2 drawOrigin = new Vector2(texture.Width / 2, texture.Height / 2);