Only check the bits actually used for wavelength in photon ctype

Fixes black photons not being killed after passing through pipe
This commit is contained in:
jacksonmj 2012-01-20 22:37:02 +08:00 committed by Simon Robertshaw
parent f0730818e4
commit 748a528fe0
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -2298,7 +2298,7 @@ killed:
kill_part(i);
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);
continue;
}