mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
fix: emitter does not skip particles
This commit is contained in:
parent
82733d3801
commit
983e516fb4
1 changed files with 1 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ void Emitter::update(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
timer += delta;
|
||||||
const float maxDistance = preset.maxDistance;
|
const float maxDistance = preset.maxDistance;
|
||||||
if (glm::distance2(position, cameraPosition) > maxDistance * maxDistance) {
|
if (glm::distance2(position, cameraPosition) > maxDistance * maxDistance) {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
|
@ -77,7 +78,6 @@ void Emitter::update(
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
timer += delta;
|
|
||||||
while (count && timer > spawnInterval) {
|
while (count && timer > spawnInterval) {
|
||||||
// spawn particle
|
// spawn particle
|
||||||
Particle particle = prototype;
|
Particle particle = prototype;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue