diff --git a/Particles/FusableParticleManager.cs b/Particles/FusableParticleManager.cs
index a981918daf..8305f637fe 100644
--- a/Particles/FusableParticleManager.cs
+++ b/Particles/FusableParticleManager.cs
@@ -176,6 +176,9 @@ namespace CalamityMod.Particles
/// The type to check.
internal static FusableParticleRenderCollection GetParticleRenderCollectionByType(Type type)
{
+ if (Main.netMode == NetmodeID.Server)
+ return null;
+
return ParticleSets.First(s => s.ParticleSet.GetType() == type);
}
@@ -185,6 +188,9 @@ namespace CalamityMod.Particles
/// The type to check.
public static T GetParticleSetByType() where T : BaseFusableParticleSet
{
+ if (Main.netMode == NetmodeID.Server)
+ return null;
+
return ParticleSets.First(s => s.ParticleSet.GetType() == typeof(T)).ParticleSet as T;
}
}
diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs
index 4a0b5b8997..4d69980a21 100644
--- a/Projectiles/Magic/SmallSpirit.cs
+++ b/Projectiles/Magic/SmallSpirit.cs
@@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Magic
// Emit particles.
Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Circular(5f, 5f) * radius / 130f;
- FusableParticleManager.GetParticleSetByType().SpawnParticle(spawnPosition, radius);
+ FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, radius);
}
public override Color? GetAlpha(Color lightColor) => Color.White * projectile.Opacity;
diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs
index b8e04f6890..5ee3f0577f 100644
--- a/Projectiles/Magic/SpiritCongregation.cs
+++ b/Projectiles/Magic/SpiritCongregation.cs
@@ -232,12 +232,12 @@ namespace CalamityMod.Projectiles.Magic
{
// Summon a base particle.
Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Circular(1f, 1f) * particleSize / 26f;
- FusableParticleManager.GetParticleSetByType().SpawnParticle(spawnPosition, particleSize);
+ FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, particleSize);
// And an "ahead" particle that spawns based on current movement.
// This causes the "head" of the overall thing to have bumps when moving.
spawnPosition += projectile.velocity.RotatedByRandom(1.38f) * particleSize / 105f;
- FusableParticleManager.GetParticleSetByType().SpawnParticle(spawnPosition, particleSize * 0.4f);
+ FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, particleSize * 0.4f);
}
// Release gas projectiles randomly. This does not happen when dying.
diff --git a/Projectiles/Magic/SpiritDust.cs b/Projectiles/Magic/SpiritDust.cs
index 652cc57501..849438ff38 100644
--- a/Projectiles/Magic/SpiritDust.cs
+++ b/Projectiles/Magic/SpiritDust.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic
{
float radius = MathHelper.SmoothStep(80f, 48f, 1f - projectile.timeLeft / 90f);
Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Circular(5f, 5f) * radius / 130f;
- FusableParticleManager.GetParticleSetByType().SpawnParticle(spawnPosition, radius);
+ FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, radius);
}
}
}