summaryrefslogtreecommitdiff
path: root/src/elements/h2.c
diff options
context:
space:
mode:
authorJacob1 <jfu614@gmail.com>2012-05-23 23:53:50 (GMT)
committer Jacob1 <jfu614@gmail.com>2012-05-23 23:53:50 (GMT)
commit1026963293716c8d340fcb857c0af092af92aa11 (patch)
tree6649ab39b146da9c9f56e6369227708e64fa837d /src/elements/h2.c
parent0799c2e09d2e7a4237b393c8eaa61031418ec402 (diff)
downloadpowder-1026963293716c8d340fcb857c0af092af92aa11.zip
powder-1026963293716c8d340fcb857c0af092af92aa11.tar.gz
fusion changes
Diffstat (limited to 'src/elements/h2.c')
-rw-r--r--src/elements/h2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/elements/h2.c b/src/elements/h2.c
index 212e56e..d03cd50 100644
--- a/src/elements/h2.c
+++ b/src/elements/h2.c
@@ -35,7 +35,7 @@ int update_H2(UPDATE_FUNC_ARGS)
}
if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f)
continue;
- if (parts[i].tmp != 1)
+ if (parts[i].temp < 2273.15)
{
if (rt==PT_FIRE)
{
@@ -54,20 +54,18 @@ int update_H2(UPDATE_FUNC_ARGS)
}
if (parts[i].temp > 2273.15 && pv[y/CELL][x/CELL] > 50.0f)
{
- parts[i].tmp = 1;
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); if (j != -1) parts[j].temp = temp;
+ j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp;
j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
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 != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
+ j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); if (j != -1) parts[j].temp = temp;
if (rand()%2)
{
@@ -75,7 +73,7 @@ int update_H2(UPDATE_FUNC_ARGS)
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
}
- parts[i].temp += 6000;
+ parts[i].temp += 750+rand()%500;
pv[y/CELL][x/CELL] += 30;
}
}