summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-03 23:42:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-05 15:32:06 (GMT)
commite600c20ba95c072631a4320f8be3810e7a6f631d (patch)
treeb14a46213e0a13416de16eb875cf3cbc2a5ce969 /src/simulation/Simulation.cpp
parent97cea273e5d02ed13d674ec8cc8308afe51e54b0 (diff)
downloadpowder-e600c20ba95c072631a4320f8be3810e7a6f631d.zip
powder-e600c20ba95c072631a4320f8be3810e7a6f631d.tar.gz
undo ambient heat in snapshots
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 682d3e0..7ad2250 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -230,6 +230,7 @@ Snapshot * Simulation::CreateSnapshot()
snap->AirPressure.insert(snap->AirPressure.begin(), &pv[0][0], &pv[0][0]+((XRES/CELL)*(YRES/CELL)));
snap->AirVelocityX.insert(snap->AirVelocityX.begin(), &vx[0][0], &vx[0][0]+((XRES/CELL)*(YRES/CELL)));
snap->AirVelocityY.insert(snap->AirVelocityY.begin(), &vy[0][0], &vy[0][0]+((XRES/CELL)*(YRES/CELL)));
+ snap->AmbientHeat.insert(snap->AmbientHeat.begin(), &hv[0][0], &hv[0][0]+((XRES/CELL)*(YRES/CELL)));
snap->Particles.insert(snap->Particles.begin(), parts, parts+NPART);
snap->PortalParticles.insert(snap->PortalParticles.begin(), &portalp[0][0][0], &portalp[CHANNELS-1][8-1][80-1]);
snap->WirelessData.insert(snap->WirelessData.begin(), &wireless[0][0], &wireless[CHANNELS-1][2-1]);
@@ -250,6 +251,7 @@ void Simulation::Restore(const Snapshot & snap)
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.AirVelocityY.begin(), snap.AirVelocityY.end(), &vy[0][0]);
+ std::copy(snap.AmbientHeat.begin(), snap.AmbientHeat.end(), &hv[0][0]);
std::copy(snap.Particles.begin(), snap.Particles.end(), parts);
std::copy(snap.PortalParticles.begin(), snap.PortalParticles.end(), &portalp[0][0][0]);
std::copy(snap.WirelessData.begin(), snap.WirelessData.end(), &wireless[0][0]);