summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-09-16 19:46:25 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-18 19:49:45 (GMT)
commitbaef6f20c2cbc30b5c516c40bfc22cba1a4c3979 (patch)
tree017a91b7b78520afc5d61fe004cee4c6801df25d /src
parentcf9b36d3db42d3f39b0195c885119579c019edd5 (diff)
downloadpowder-baef6f20c2cbc30b5c516c40bfc22cba1a4c3979.zip
powder-baef6f20c2cbc30b5c516c40bfc22cba1a4c3979.tar.gz
Fix disappearing particles, e.g. with a box of CONV (ctype DEUT) containing neutrons
Diffstat (limited to 'src')
-rw-r--r--src/powder.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c
index 0854217..d307f39 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -804,7 +804,15 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
pfree = parts[i].life;
}
else
+ {
+ int oldX = (int)(parts[p].x+0.5f);
+ int oldY = (int)(parts[p].y+0.5f);
+ if ((pmap[oldY][oldX]>>8)==p)
+ pmap[oldY][oldX] = 0;
+ if ((photons[oldY][oldX]>>8)==p)
+ photons[oldY][oldX] = 0;
i = p;
+ }
if (i>parts_lastActiveIndex) parts_lastActiveIndex = i;