diff options
| author | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-15 23:57:44 (GMT) |
|---|---|---|
| committer | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-15 23:57:44 (GMT) |
| commit | 76306f9260e519c098a312303e07be38860ef1f7 (patch) | |
| tree | 6414b56a79e9abeb7540b9abb1e8e223a74f8bea /src/simulation/Simulation.cpp | |
| parent | ba095664c0c7a1f16e3dbc05d52fe3c31095ed66 (diff) | |
| download | powder-76306f9260e519c098a312303e07be38860ef1f7.zip powder-76306f9260e519c098a312303e07be38860ef1f7.tar.gz | |
Fix a bug with create_part() not unlinking solids. Solids now pass through gases.
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c6dec35..0a24539 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2191,6 +2191,8 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) e = eval_move(parts[i].type, nx, ny, &r); if(parts[i].sld && r && parts[i].sld == parts[r>>8].sld) return 1; + if(parts[i].sld && r && (elements[r&255].Properties & (TYPE_GAS | TYPE_ENERGY))) + return 2; if(!e && r && parts[r>>8].sld) { parts[r>>8].vx += parts[i].vx; @@ -2910,6 +2912,8 @@ int Simulation::create_part(int p, int x, int y, int tv) { detach(i); } + if(parts[p].sld) + unlink_solid(p); i = p; } |
