sanity check for psa/psc rocktype

This commit is contained in:
Mishiro Usui committed 2023-09-03 16:33:30 +01:00
1 parent 0b34fde5c7
commit f1d5dc495d
1 file changed
+1 -1
+1 -1
View File
@@ -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<Texture2D>("CalamityMod/NPCs/ProfanedGuardians/ProfanedRocks" + rockType.ToString()).Value;
Vector2 drawOrigin = new Vector2(texture.Width / 2, texture.Height / 2);