summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-12-13 09:04:56 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-12-18 14:04:47 (GMT)
commit46068833d130eecc95942613cd8cc9c4cb6188fe (patch)
treecc626449d28ab234aed87dfc5479aa87981178ed /src/elements
parent2015499ff1f61d59e38e7943248d46cc2b16bc41 (diff)
downloadpowder-46068833d130eecc95942613cd8cc9c4cb6188fe.zip
powder-46068833d130eecc95942613cd8cc9c4cb6188fe.tar.gz
Make PIPE detach SOAP particles (crash fix)
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/pipe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/elements/pipe.c b/src/elements/pipe.c
index 61c56f6..1607a0b 100644
--- a/src/elements/pipe.c
+++ b/src/elements/pipe.c
@@ -147,6 +147,8 @@ int update_PIPE(UPDATE_FUNC_ARGS) {
//try eating particle at entrance
else if ((parts[i].tmp&0xFF) == 0 && (ptypes[r&0xFF].falldown!= 0 || ptypes[r&0xFF].state == ST_GAS))
{
+ if ((r&0xFF)==PT_SOAP)
+ detach(r>>8);
parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type;
parts[i].temp = parts[r>>8].temp;
parts[i].flags = parts[r>>8].life;