Remove the dragon's flame cloud when it takes off

DragonSittingFlamingPhase.end discards the cloud it made; Horizon left it to last its full 200 ticks after the phase ended.
This commit is contained in:
Kacpherek
2026-10-27 22:19:36 +01:00
parent 5703fdfdc4
commit a1dfcbf2b3
+8
View File
@@ -2230,12 +2230,20 @@ impl Game<'_> {
.filter(|p| p.alive && !p.creative && !p.spectator)
.collect();
let mut harmed: Vec<(FightWho, f32)> = Vec::new();
// DragonSittingFlamingPhase.end discards the flame cloud.
let flame_over = self
.dragon
.as_ref()
.is_some_and(|d| !matches!(d.phase, Phase::Flaming { .. }));
let mut clouds = std::mem::take(&mut self.breath_clouds);
clouds.retain_mut(|c| {
// Lingering potions' clouds tick with the potions.
if c.potion.is_some() {
return true;
}
if c.from_dragon && flame_over {
return false;
}
c.age += 1;
if c.age >= c.duration {
return false;