mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Sanitize invalid particle spawner time (#15465)
This commit is contained in:
@@ -270,6 +270,7 @@ ParticleSpawner::ParticleSpawner(
|
||||
}
|
||||
|
||||
size_t max_particles = 0; // maximum number of particles likely to be visible at any given time
|
||||
assert(p.time >= 0);
|
||||
if (p.time != 0) {
|
||||
auto maxGenerations = p.time / std::min(p.exptime.start.min, p.exptime.end.min);
|
||||
max_particles = p.amount / maxGenerations;
|
||||
|
Reference in New Issue
Block a user