Preserve stacked particles in saves being placed (fixes #743)
This commit is contained in:
parent
2273233b71
commit
86a621741d
@ -156,6 +156,10 @@ int Simulation::Load(GameSave * save, bool includePressure, int fullX, int fullY
|
||||
parts[ID(r)] = tempPart;
|
||||
i = ID(r);
|
||||
elementCount[tempPart.type]++;
|
||||
// * pmap will be repopulated a bit later by RecalcFreeParticles;
|
||||
// until then, remove the entry so the next new particle at the
|
||||
// same position doesn't overwrite the one we've just copied
|
||||
pmap[y][x] = 0;
|
||||
}
|
||||
else if ((r = photons[y][x]))
|
||||
{
|
||||
@ -163,6 +167,8 @@ int Simulation::Load(GameSave * save, bool includePressure, int fullX, int fullY
|
||||
parts[ID(r)] = tempPart;
|
||||
i = ID(r);
|
||||
elementCount[tempPart.type]++;
|
||||
// * same as with pmap above
|
||||
photons[y][x] = 0;
|
||||
}
|
||||
//Allocate new particle
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user