summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStanislaw Skowronek <skylark@disorder.sko>2013-11-15 23:57:44 (GMT)
committer Stanislaw Skowronek <skylark@disorder.sko>2013-11-15 23:57:44 (GMT)
commit76306f9260e519c098a312303e07be38860ef1f7 (patch)
tree6414b56a79e9abeb7540b9abb1e8e223a74f8bea /src
parentba095664c0c7a1f16e3dbc05d52fe3c31095ed66 (diff)
downloadpowder-76306f9260e519c098a312303e07be38860ef1f7.zip
powder-76306f9260e519c098a312303e07be38860ef1f7.tar.gz
Fix a bug with create_part() not unlinking solids. Solids now pass through gases.
Diffstat (limited to 'src')
-rw-r--r--src/simulation/Simulation.cpp4
-rw-r--r--src/simulation/elements/COAL.cpp4
-rw-r--r--src/simulation/elements/WOOD.cpp4
3 files changed, 8 insertions, 4 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;
}
diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp
index b2cc89c..5d2c176 100644
--- a/src/simulation/elements/COAL.cpp
+++ b/src/simulation/elements/COAL.cpp
@@ -12,9 +12,9 @@ Element_COAL::Element_COAL()
Advection = 0.0f;
AirDrag = 0.00f * CFDS;
AirLoss = 0.90f;
- Loss = 0.00f;
+ Loss = 0.98f;
Collision = 0.0f;
- Gravity = 0.0f;
+ Gravity = 0.2f;
Diffusion = 0.0f;
HotAir = 0.0f * CFDS;
Falldown = 0;
diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp
index 4676790..0e00780 100644
--- a/src/simulation/elements/WOOD.cpp
+++ b/src/simulation/elements/WOOD.cpp
@@ -12,9 +12,9 @@ Element_WOOD::Element_WOOD()
Advection = 0.0f;
AirDrag = 0.00f * CFDS;
AirLoss = 0.90f;
- Loss = 0.00f;
+ Loss = 0.95f;
Collision = 0.0f;
- Gravity = 0.0f;
+ Gravity = 0.1f;
Diffusion = 0.00f;
HotAir = 0.000f * CFDS;
Falldown = 0;