TPT: Only check the bits actually used for wavelength in photon ctype Fixes black photons not being killed after passing through pipe 748a528fe0

This commit is contained in:
Simon Robertshaw 2012-04-17 16:33:04 +01:00
parent 475fd1a0b8
commit 065ca8b9f5
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ int update_PHOT(UPDATE_FUNC_ARGS) {
float rr, rrr; float rr, rrr;
parts[i].pavg[0] = x; parts[i].pavg[0] = x;
parts[i].pavg[1] = y; parts[i].pavg[1] = y;
if (!parts[i].ctype) { if (!(parts[i].ctype&0x3FFFFFFF)) {
sim->kill_part(i); sim->kill_part(i);
return 1; return 1;
} }

View File

@ -3003,7 +3003,7 @@ killed:
kill_part(i); kill_part(i);
continue; continue;
} }
if (!parts[i].ctype&&t!=PT_NEUT&&t!=PT_ELEC) { if (!(parts[i].ctype&0x3FFFFFFF)&&t!=PT_NEUT&&t!=PT_ELEC) {
kill_part(i); kill_part(i);
continue; continue;
} }