Fix gravity field appearing after ctrl+z even if gravity is off, Fixes #293
This commit is contained in:
parent
d63c6012c6
commit
c85ac21d84
@ -343,10 +343,13 @@ void Simulation::Restore(const Snapshot & snap)
|
||||
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]);
|
||||
std::copy(snap.GravVelocityX.begin(), snap.GravVelocityX.end(), gravx);
|
||||
std::copy(snap.GravVelocityY.begin(), snap.GravVelocityY.end(), gravy);
|
||||
std::copy(snap.GravValue.begin(), snap.GravValue.end(), gravp);
|
||||
std::copy(snap.GravMap.begin(), snap.GravMap.end(), gravmap);
|
||||
if (grav->ngrav_enable)
|
||||
{
|
||||
std::copy(snap.GravVelocityX.begin(), snap.GravVelocityX.end(), gravx);
|
||||
std::copy(snap.GravVelocityY.begin(), snap.GravVelocityY.end(), gravy);
|
||||
std::copy(snap.GravValue.begin(), snap.GravValue.end(), gravp);
|
||||
std::copy(snap.GravMap.begin(), snap.GravMap.end(), gravmap);
|
||||
}
|
||||
std::copy(snap.BlockMap.begin(), snap.BlockMap.end(), &bmap[0][0]);
|
||||
std::copy(snap.ElecMap.begin(), snap.ElecMap.end(), &emap[0][0]);
|
||||
std::copy(snap.FanVelocityX.begin(), snap.FanVelocityX.end(), &fvx[0][0]);
|
||||
|
Loading…
Reference in New Issue
Block a user