summaryrefslogtreecommitdiff
path: root/src/powder.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-08-10 10:13:39 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-10 23:38:56 (GMT)
commit2e323ea018369a2a929a68c725d113156ef50471 (patch)
tree64fe1a96d0cee8d40fe036f210b6e272131ba600 /src/powder.c
parent1713604233a4090f7f73ba86c33e72dd3c44d13c (diff)
downloadpowder-2e323ea018369a2a929a68c725d113156ef50471.zip
powder-2e323ea018369a2a929a68c725d113156ef50471.tar.gz
Update parts_lastActiveIndex when creating neut/phot
Diffstat (limited to 'src/powder.c')
-rw-r--r--src/powder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c
index 4068e3c..88cb713 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -1026,6 +1026,7 @@ static void create_gain_photon(int pp)//photons from PHOT going through GLOW
return;
pfree = parts[i].life;
+ if (i>parts_lastActiveIndex) parts_lastActiveIndex = i;
parts[i].type = PT_PHOT;
parts[i].life = 680;
@@ -1062,6 +1063,7 @@ static void create_cherenkov_photon(int pp)//photons from NEUT going through GLA
return;
pfree = parts[i].life;
+ if (i>parts_lastActiveIndex) parts_lastActiveIndex = i;
lr = rand() % 2;