mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-28 10:20:04 +02:00
Fixed the bug with SPWN not creating when redoing (Ctrl-Z).
This commit is contained in:
@@ -307,6 +307,10 @@ Snapshot * Simulation::CreateSnapshot()
|
|||||||
void Simulation::Restore(const Snapshot & snap)
|
void Simulation::Restore(const Snapshot & snap)
|
||||||
{
|
{
|
||||||
parts_lastActiveIndex = NPART-1;
|
parts_lastActiveIndex = NPART-1;
|
||||||
|
|
||||||
|
for(int i; i<NPART; i++)
|
||||||
|
elementCount[i] = 0;
|
||||||
|
|
||||||
std::copy(snap.AirPressure.begin(), snap.AirPressure.end(), &pv[0][0]);
|
std::copy(snap.AirPressure.begin(), snap.AirPressure.end(), &pv[0][0]);
|
||||||
std::copy(snap.AirVelocityX.begin(), snap.AirVelocityX.end(), &vx[0][0]);
|
std::copy(snap.AirVelocityX.begin(), snap.AirVelocityX.end(), &vx[0][0]);
|
||||||
std::copy(snap.AirVelocityY.begin(), snap.AirVelocityY.end(), &vy[0][0]);
|
std::copy(snap.AirVelocityY.begin(), snap.AirVelocityY.end(), &vy[0][0]);
|
||||||
|
Reference in New Issue
Block a user