diff options
| author | Simon Robertshaw <simon@HardWIRED-Laptop.localdomain> | 2010-10-30 13:36:13 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@HardWIRED-Laptop.localdomain> | 2010-10-30 13:36:13 (GMT) |
| commit | de9171c1eb5b9e130b8bf0607d509cbefe042730 (patch) | |
| tree | b5184b8bdea758033baafe111b08facec914e95c /src | |
| parent | 813c4dbc468988026ea8449e08f99ffd420255ab (diff) | |
| download | powder-de9171c1eb5b9e130b8bf0607d509cbefe042730.zip powder-de9171c1eb5b9e130b8bf0607d509cbefe042730.tar.gz | |
FINALLY NEUTRONS ARE FIXED
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/powder.c b/src/powder.c index e9be0f3..9db1fbf 100644 --- a/src/powder.c +++ b/src/powder.c @@ -95,13 +95,19 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr) if(ptypes[pt].falldown!=1 && bmap[ny/CELL][nx/CELL]==10) return 0; - if(ptypes[pt].properties&TYPE_ENERGY && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&TYPE_ENERGY)))) + if(r && (r&0xFF) < PT_NUM){ + //if(ptypes[pt].properties&TYPE_ENERGY && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&TYPE_ENERGY)))) + if(ptypes[pt].properties&TYPE_ENERGY && ptypes[(r&0xFF)].properties&TYPE_ENERGY) return 2; - if(pt==PT_NEUT && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE)))) + //if(pt==PT_NEUT && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE)))) + if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPASS) + return 2; + if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE) return 1; if((r&0xFF)==PT_NEUT && ptypes[pt].properties&PROP_NEUTPENETRATE) return 0; + } if (r && ((r&0xFF) >= PT_NUM || (ptypes[pt].weight <= ptypes[(r&0xFF)].weight))) return 0; @@ -2873,7 +2879,7 @@ killed: kill_part(i); continue; } - else if(t==PT_NEUT || t==PT_PHOT) + else if(t==PT_NEUT || t==PT_PHOT) //Seems to break neutrons, sorry Skylark { r = pmap[ny][nx]; @@ -2909,12 +2915,14 @@ killed: continue; } } else { - kill_part(i); + if(t!=PT_NEUT) + kill_part(i); continue; } if(!parts[i].ctype) { - kill_part(i); + if(t!=PT_NEUT) + kill_part(i); continue; } } |
