Fix some particles flickering when SRT is enabled

Broken since c645269c86, where we started giving the renderer thread only the live part of Simulation::parts. Or at least intended to, but ended up copying whatever amount we should have copied the previous time around. The flickering was hard to notice because the number of particles rarely changes much between frames.
This commit is contained in:
Tamás Bálint Misius
2025-01-07 14:55:51 +01:00
parent 462460b6b3
commit 4701766ec3

View File

@@ -52,7 +52,7 @@ struct Parts
Parts &operator =(const Parts &other) Parts &operator =(const Parts &other)
{ {
std::copy(other.data.begin(), other.data.begin() + lastActiveIndex + 1, data.begin()); std::copy(other.data.begin(), other.data.begin() + other.lastActiveIndex + 1, data.begin());
lastActiveIndex = other.lastActiveIndex; lastActiveIndex = other.lastActiveIndex;
return *this; return *this;
} }