update Emitter randomizer

This commit is contained in:
MihailRis 2024-12-23 16:54:25 +03:00
parent 7f95306c65
commit e899575a7a

View File

@ -23,7 +23,7 @@ Emitter::Emitter(
texture(texture), texture(texture),
count(count), count(count),
preset(std::move(preset)) { preset(std::move(preset)) {
random.setSeed(rand()); random.setSeed(reinterpret_cast<ptrdiff_t>(this));
this->prototype.emitter = this; this->prototype.emitter = this;
timer = preset.spawnInterval * random.randFloat(); timer = preset.spawnInterval * random.randFloat();
} }