diff options
| author | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-17 01:49:23 (GMT) |
|---|---|---|
| committer | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-17 01:49:23 (GMT) |
| commit | 8da31ce0dc530c5a35374ea9e9090e45bbdc70ca (patch) | |
| tree | 473a9c3fa5842fd54d2b1bdb4a4d53cf654e91cd | |
| parent | 2c945a5dabbc6b7e16d8a6820fde772a2cc1019c (diff) | |
| download | powder-8da31ce0dc530c5a35374ea9e9090e45bbdc70ca.zip powder-8da31ce0dc530c5a35374ea9e9090e45bbdc70ca.tar.gz | |
Sponge. Not a moving solid, eh.
| -rw-r--r-- | src/simulation/Simulation.cpp | 9 | ||||
| -rw-r--r-- | src/simulation/elements/SPNG.cpp | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index eb8f065..3bf8fc9 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3761,21 +3761,24 @@ void Simulation::update_particles_i(int start, int inc) } if ((elements[t].Gravity && (!(elements[t].Properties & TYPE_SOLID) || parts[i].sld)) || !(elements[t].Properties & TYPE_SOLID)) { + float grav = elements[t].Gravity; + if(t == PT_SPNG) + grav += 0.04 * parts[i].life; //Gravity mode by Moach switch (gravityMode) { default: case 0: pGravX = 0.0f; - pGravY = elements[t].Gravity; + pGravY = grav; break; case 1: pGravX = pGravY = 0.0f; break; case 2: pGravD = 0.01f - hypotf((x - XCNTR), (y - YCNTR)); - pGravX = elements[t].Gravity * ((float)(x - XCNTR) / pGravD); - pGravY = elements[t].Gravity * ((float)(y - YCNTR) / pGravD); + pGravX = grav * ((float)(x - XCNTR) / pGravD); + pGravY = grav * ((float)(y - YCNTR) / pGravD); break; } //Get some gravity from the gravity map diff --git a/src/simulation/elements/SPNG.cpp b/src/simulation/elements/SPNG.cpp index 47a3b77..083680b 100644 --- a/src/simulation/elements/SPNG.cpp +++ b/src/simulation/elements/SPNG.cpp @@ -12,9 +12,9 @@ Element_SPNG::Element_SPNG() Advection = 0.00f; AirDrag = 0.00f * CFDS; AirLoss = 0.00f; - Loss = 0.00f; + Loss = 0.98f; Collision = 0.00f; - Gravity = 0.0f; + Gravity = 0.02f; Diffusion = 0.00f; HotAir = 0.000f * CFDS; Falldown = 0; |
