diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-13 00:28:00 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-13 00:28:00 (GMT) |
| commit | 5f81b707878f3ea30b713321219abd0d1f51afa9 (patch) | |
| tree | 0927d6a59a6847d85c4956492d22aaf71137c980 /src/simulation/Simulation.cpp | |
| parent | 2aebc294e8d3bb339ce36ada46edfe87872cfa05 (diff) | |
| download | powder-5f81b707878f3ea30b713321219abd0d1f51afa9.zip powder-5f81b707878f3ea30b713321219abd0d1f51afa9.tar.gz | |
TPT: Avoid stacking in INVS and FILT, and fix pressurised INVS graphics
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 87603f2..6477fd4 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2988,6 +2988,7 @@ void Simulation::update_particles_i(int start, int inc) create_part(i, x, y, PT_NBHL); parts[i].temp = MAX_TEMP; parts[i].tmp = pmap_count[y][x]-NPART;//strength of grav field + if (parts[i].tmp>51200) parts[i].tmp = 51200; pmap_count[y][x] = NPART; } else @@ -4151,7 +4152,10 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu photons[y][x] = t|(i<<8); else { - pmap[y][x] = t|(i<<8); + // Particles are sometimes allowed to go inside INVS and FILT + // To make particles collide correctly when inside these elements, these elements must not overwrite an existing pmap entry from particles inside them + if (!pmap[y][x] || (t!=PT_INVIS && t!= PT_FILT)) + pmap[y][x] = t|(i<<8); pmap_count[y][x]++; } } |
