From 138b2e94b0ab96efce99c7098c4faae86abc105f Mon Sep 17 00:00:00 2001 From: Flowaria Date: Tue, 25 Nov 2025 23:27:38 +0900 Subject: [PATCH] CosmicWorm - Changed CombatText logic --- Items/SummonItems/CosmicWorm.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 656588fe34..c49bed0603 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -41,15 +41,21 @@ namespace CalamityMod.Items.SummonItems public override bool? UseItem(Player player) { - string key = "Mods.CalamityMod.Status.Boss.DoGSpawn"; - Color messageColor = Color.Cyan; - Main.NewText(Language.GetTextValue(key), messageColor); + // Server literally do nothing here. + if (Main.dedServ) + return true; - if (!Main.dedServ) + string key = "Mods.CalamityMod.Status.Boss.DoGSpawn"; + string spawnText = Language.GetTextValue(key); + Color messageColor = Color.Cyan; + Main.NewText(spawnText, messageColor); + + var subtitleID = CombatText.NewText(player.Hitbox, messageColor, spawnText, true); + if (subtitleID < Main.maxCombatText) { - var subtitle = Main.combatText[CombatText.NewText(player.Hitbox, messageColor, Language.GetTextValue(key), true)]; - player.Calamity().subtitletext = subtitle; - player.Calamity().subtitleColors = [Color.Cyan, Color.Fuchsia]; + var localPlayer = Main.LocalPlayer.Calamity(); + localPlayer.subtitletext = Main.combatText[subtitleID]; + localPlayer.subtitleColors = [Color.Cyan, Color.Fuchsia]; } CalamityUtils.SpawnBossOnPosUsingItem(player, (int)player.Center.X, (int)player.Center.Y - 1600, DevourerofGodsHead.SpawnSound);