summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 18:59:19 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 18:59:19 (GMT)
commit2e1780ce4e223b1fb78e8537f80d0eef73ef7864 (patch)
treea4a4aa8709a846f18cd116d0ccc17032e19b3048 /src/simulation/Simulation.cpp
parenta95ceb4c928baf4eace240852f17af6518b86f8f (diff)
downloadpowder-2e1780ce4e223b1fb78e8537f80d0eef73ef7864.zip
powder-2e1780ce4e223b1fb78e8537f80d0eef73ef7864.tar.gz
TPT: VOID & PVOD can be set to only eat/not eat certain things
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index a195738..00f10d5 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -1978,7 +1978,8 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
}
if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles
{
- kill_part(i);
+ if(!parts[r>>8].ctype || (parts[r>>8].ctype==parts[i].type)!=(parts[r>>8].tmp&1))
+ kill_part(i);
return 0;
}
if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles