From baef6f20c2cbc30b5c516c40bfc22cba1a4c3979 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sat, 17 Sep 2011 03:46:25 +0800 Subject: Fix disappearing particles, e.g. with a box of CONV (ctype DEUT) containing neutrons 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; -- cgit v0.9.2-21-gd62e