mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-25 01:06:04 +02:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user