Files
fs2open.github.com/code
wookieejedi 4ddcaec027 Debris Cleanup
In current master the debris creation logic was really showing some rust, which resulted in inconsistent behavior when using `Lifetime Min` and `Lifetime Max` for debris in the `ships.tbl`. Specifically, by default debris can randomly be set as `DoNotExpire` if the check `(Random::next() < (Random::MAX_VALUE / 6))` is false. This was set *before* the code that set the lifetimes from `Min` and `Max` from the table though, which could randomly result in debris with infinite lifetimes even if a min and max were specified (and the ship was small, since large ships trigger infinite debris by default always).

Also, by default, ships with a radius larger than 50 meters always had infinite debris lifetimes because of `MIN_RADIUS_FOR_PERSISTENT_DEBRIS`. Thus, this PR also allows modders to set that value in the game settings table.

Tested and works as expected.
2025-08-04 12:05:54 -04:00
..
2024-10-09 14:39:34 -04:00
2025-08-04 12:05:54 -04:00
2025-07-22 00:17:22 +02:00
2025-07-26 01:22:44 +00:00
2018-07-15 19:37:24 +02:00
2025-06-10 14:45:50 -04:00
2025-08-01 22:36:54 -04:00
2024-12-16 18:12:30 +01:00
2025-07-22 00:17:22 +02:00
2025-07-22 00:17:22 +02:00
2025-07-28 19:21:14 -04:00
2025-08-04 12:05:54 -04:00
2025-08-04 00:18:09 -04:00
2025-05-10 01:15:46 -04:00
2025-07-10 15:10:19 -04:00
2025-07-21 15:32:25 -05:00
2025-05-08 02:50:29 -04:00
2025-05-17 00:27:00 -04:00
2024-11-22 20:12:17 -05:00
2025-02-01 13:26:28 +01:00