summaryrefslogtreecommitdiff
path: root/src/simulation/elements/FIRE.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-12 18:47:46 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:12:13 (GMT)
commit947660fcd445be2e09fe52da912547a69c685ba7 (patch)
treeeefa62f38b206497b45d85ff5e888d4ed788c106 /src/simulation/elements/FIRE.cpp
parentccd9284e61ee453e8f0541af671c3199548853a4 (diff)
downloadpowder-947660fcd445be2e09fe52da912547a69c685ba7.zip
powder-947660fcd445be2e09fe52da912547a69c685ba7.tar.gz
Fix hydrogen not burning right (with and without realistic heat), allow h2 to burn at all temps while still allowing fusion to work correctly
Diffstat (limited to 'src/simulation/elements/FIRE.cpp')
-rw-r--r--src/simulation/elements/FIRE.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp
index 0a98149..5345070 100644
--- a/src/simulation/elements/FIRE.cpp
+++ b/src/simulation/elements/FIRE.cpp
@@ -58,7 +58,7 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
}
if(t==PT_FIRE && parts[i].life <=1)
{
- if (parts[i].tmp==3){
+ if ((parts[i].tmp&0x3) == 3){
t = PT_DSTW;
sim->part_change_type(i,x,y,t);
parts[i].life = 0;
@@ -73,7 +73,7 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
}
if(t==PT_PLSM && parts[i].life <=1)
{
- if (parts[i].tmp==3){
+ if ((parts[i].tmp&0x3) == 3){
t = PT_DSTW;
sim->part_change_type(i,x,y,t);
parts[i].life = 0;
@@ -94,7 +94,7 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
(t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) &&
(t!=PT_PHOT || rt!=PT_INSL) &&
(rt!=PT_SPNG || parts[r>>8].life==0) &&
- (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) &&
+ (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) &&
sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
{
sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE);