VapourCloud: drop the zero-lifetime guard saturate already covers

The mutation table let the guard's removal survive: with saturate's NaN rule
(max(0, NaN) = 0) a zero-lifetime cloud has no opacity without it, and
ACloudWithNoLifetimeObscuresNothing still pins that behaviour. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-09 21:17:35 +02:00
commit 950b0e3ddc

View file

@ -16,8 +16,9 @@ public sealed class VapourCloud
public float Opacity;
public Entity Venter;
// A cloud with no lifetime divides by zero; saturate maps the NaN and the infinity to nothing left.
public float OpacityAt(double now) =>
Lifetime <= 0f ? 0f : saturate(Opacity) * saturate(1f - (float) (now - VentedAt) / Lifetime);
saturate(Opacity) * saturate(1f - (float) (now - VentedAt) / Lifetime);
// Whether the segment a-b reaches the disc: the closest point of the segment to the centre lies within the
// radius. A cloud past either end of the segment touches it only if it is near that end.