diff options
| author | Jacob1 <jfu614@gmail.com> | 2012-03-14 23:35:28 (GMT) |
|---|---|---|
| committer | Jacob1 <jfu614@gmail.com> | 2012-03-14 23:35:28 (GMT) |
| commit | 803ded3b334abc27252974f3f6cdda282af6621d (patch) | |
| tree | ca8ebbeac50a43055aa17584983978d465eadf81 /src/elements | |
| parent | 83d4658589d366a8a708d64c912c128bcebb9d1c (diff) | |
| download | powder-803ded3b334abc27252974f3f6cdda282af6621d.zip powder-803ded3b334abc27252974f3f6cdda282af6621d.tar.gz | |
fusion step 2 + modify temp/pressure of step 1
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/h2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/elements/h2.c b/src/elements/h2.c index fa504ca..c073014 100644 --- a/src/elements/h2.c +++ b/src/elements/h2.c @@ -43,25 +43,25 @@ int update_H2(UPDATE_FUNC_ARGS) if (rand()%5 < 1) { int j; + float temp = parts[i].temp; part_change_type(i,x,y,PT_PLSM); parts[i].life = rand()%150+50; - create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); - create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j) parts[j].ctype = 0xFFFF00; + if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j) parts[j].tmp = 1; + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } if (rand()%2) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j) parts[j].tmp = 1; + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } } - if (parts[i].temp < 4273.15) - parts[i].temp = 4273.15; - pv[y/CELL][x/CELL] += 50; + parts[i].temp += 6000; + pv[y/CELL][x/CELL] += 30; } } return 0; |
