diff options
| author | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-03 18:45:56 (GMT) |
|---|---|---|
| committer | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-03 18:47:23 (GMT) |
| commit | d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7 (patch) | |
| tree | 186b21250c8f731887de996156d845e064722a47 /src/powder.c | |
| parent | 54caad7a69c424b6bcb78374aa0d0785a8a5ac93 (diff) | |
| parent | 525a59e28011cf26993c8e3f040a36ba7b7bf5e2 (diff) | |
| download | powder-d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7.zip powder-d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7.tar.gz | |
Merge branch 'upstream' into dev
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/powder.c b/src/powder.c index 3c85167..4d8ba45 100644 --- a/src/powder.c +++ b/src/powder.c @@ -577,7 +577,7 @@ inline int create_part(int p, int x, int y, int t) if (t==PT_SPRK) { - if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) + if ((pmap[y][x]>>8)>=NPART || !((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) return -1; if (parts[pmap[y][x]>>8].life!=0) return -1; @@ -1525,10 +1525,10 @@ void update_particles_i(pixel *vid, int start, int inc) ctemph = ctempl = pt; // change boiling point with pressure if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht<PT_NUM && ptypes[ptransitions[t].tht].state==ST_GAS) - || t==PT_LNTG || t==PT_SLTW) + || t==PT_LNTG || t==PT_SLTW) ctemph -= 2.0f*pv[y/CELL][x/CELL]; else if ((ptypes[t].state==ST_GAS && ptransitions[t].tlt>-1 && ptransitions[t].tlt<PT_NUM && ptypes[ptransitions[t].tlt].state==ST_LIQUID) - || t==PT_WTRV) + || t==PT_WTRV) ctempl -= 2.0f*pv[y/CELL][x/CELL]; s = 1; if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { |
