diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-06-10 20:29:16 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-06-10 20:29:16 (GMT) |
| commit | 6d307b47b5e91202f9cc1a4cc299475ff0d68493 (patch) | |
| tree | 4589094062de1c15262a428fe486d87476ea7d29 /src/elements | |
| parent | 303a32f2903d763d73060a28449e1d723f905f2b (diff) | |
| download | powder-6d307b47b5e91202f9cc1a4cc299475ff0d68493.zip powder-6d307b47b5e91202f9cc1a4cc299475ff0d68493.tar.gz | |
Revert "Make THDR TYPE_ENERGY again, so it goes in photon map"
This reverts commit 8b20bfd764308fddc1280b8a9d030e77503d0b0c.
TYPE_ENERGY makes THDR move like photons, and means adjacent particles
don't conduct as much heat from it (since the heat conduction code only
looks for particles in pmap, not photons).
Heat transfer could be fixed by increasing THDR's heat conductivity, but
gas or powder movement is probably better than photon movement for THDR.
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/firw.c | 2 | ||||
| -rw-r--r-- | src/elements/ligh.c | 4 | ||||
| -rw-r--r-- | src/elements/neut.c | 4 | ||||
| -rw-r--r-- | src/elements/thdr.c | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/src/elements/firw.c b/src/elements/firw.c index 52a783f..5bb8f3d 100644 --- a/src/elements/firw.c +++ b/src/elements/firw.c @@ -24,8 +24,6 @@ int update_FIRW(UPDATE_FUNC_ARGS) { { r = pmap[y+ry][x+rx]; if (!r) - r = photons[y+ry][x+rx]; - if (!r) continue; rt = parts[r>>8].type; if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) diff --git a/src/elements/ligh.c b/src/elements/ligh.c index 61bf8f7..146ba1f 100644 --- a/src/elements/ligh.c +++ b/src/elements/ligh.c @@ -27,7 +27,7 @@ int LIGH_nearest_part(int ci, int max_d) int cy = (int)parts[ci].y; for (i=0; i<=parts_lastActiveIndex; i++) { - if (parts[i].type && i!=ci && parts[i].type!=PT_LIGH && !(ptypes[parts[i].type].properties&TYPE_ENERGY)) + if (parts[i].type && !parts[i].life && i!=ci && parts[i].type!=PT_LIGH && parts[i].type!=PT_THDR && parts[i].type!=PT_NEUT && parts[i].type!=PT_PHOT) { ndistance = abs(cx-parts[i].x)+abs(cy-parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); if (ndistance<distance) @@ -151,7 +151,7 @@ int update_LIGH(UPDATE_FUNC_ARGS) continue; if ((r&0xFF)!=PT_LIGH && (r&0xFF)!=PT_TESC) { - if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE && !(ptypes[r&0xFF].properties&TYPE_ENERGY)) + if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT) { if ((ptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0) { diff --git a/src/elements/neut.c b/src/elements/neut.c index bbaa3bd..e3593f5 100644 --- a/src/elements/neut.c +++ b/src/elements/neut.c @@ -51,9 +51,9 @@ int create_n_parts(int n, int x, int y, float vx, float vy, float temp, int t)// parts[i].ctype = 0; parts[i].temp = temp; parts[i].tmp = 0; - if (t!=PT_STKM&&t!=PT_STKM2 && !(ptypes[t].properties&TYPE_ENERGY) && !pmap[y][x]) + if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !pmap[y][x]) pmap[y][x] = t|(i<<8); - else if ((ptypes[t].properties&TYPE_ENERGY) && !photons[y][x]) + else if ((t==PT_PHOT||t==PT_NEUT) && !photons[y][x]) photons[y][x] = t|(i<<8); pv[y/CELL][x/CELL] += 6.0f * CFDS; diff --git a/src/elements/thdr.c b/src/elements/thdr.c index d400ecb..f1aafa3 100644 --- a/src/elements/thdr.c +++ b/src/elements/thdr.c @@ -31,7 +31,7 @@ int update_THDR(UPDATE_FUNC_ARGS) { part_change_type(r>>8,x+rx,y+ry,PT_SPRK); parts[r>>8].life = 4; } - else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&!(ptypes[r&0xFF].properties&TYPE_ENERGY)&&(r&0xFF)) + else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) { pv[y/CELL][x/CELL] += 100.0f; if (legacy_enable&&1>(rand()%200)) |
