summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorjacksonmj <jacksonmj@jacksonmj.none>2011-04-15 23:53:38 (GMT)
committer Simon <simon@hardwired.org.uk>2011-04-16 16:27:25 (GMT)
commit8d8cc909bbb4bf06ced4ee8e9a0cc263e982d539 (patch)
treea3b64384c3924768aefdc8549dc6cf1cce51b397 /src/elements
parent96d2587f298cd2d235afc382ab78a11868fd3bb1 (diff)
downloadpowder-8d8cc909bbb4bf06ced4ee8e9a0cc263e982d539.zip
powder-8d8cc909bbb4bf06ced4ee8e9a0cc263e982d539.tar.gz
Ensure invisible photons get killed
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/phot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c
index a6a5d07..b4b6157 100644
--- a/src/elements/phot.c
+++ b/src/elements/phot.c
@@ -3,6 +3,10 @@
int update_PHOT(UPDATE_FUNC_ARGS) {
int r, rt, rx, ry;
float rr, rrr;
+ if (!parts[i].ctype) {
+ kill_part(i);
+ return 1;
+ }
if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)