summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-09-05 10:44:22 (GMT)
committer Simon <simon@hardwired.org.uk>2010-09-05 10:44:22 (GMT)
commit719ad7c3595686d817e97e3235cb8eb755d9fc40 (patch)
treea0c76cc13579b66d229ff343f322180a08b03e41
parent240eb4ba33f8720de6d2a40fd0302ad5f927dc79 (diff)
downloadpowder-719ad7c3595686d817e97e3235cb8eb755d9fc40.zip
powder-719ad7c3595686d817e97e3235cb8eb755d9fc40.tar.gz
Fire only turns into smoke when cold, fix neutrons
-rw-r--r--powder.c8
-rw-r--r--powder.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/powder.c b/powder.c
index 53f84c6..550f5b1 100644
--- a/powder.c
+++ b/powder.c
@@ -1187,7 +1187,11 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].type = PT_GAS;
if((r&0xFF)==PT_COAL && 5>(rand()%100))
parts[r>>8].type = PT_WOOD;*/
- if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && 15>(rand()%1000))
+ if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM &&
+ (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID||
+ ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE||
+ ptypes[parts[r>>8].type-1].menusection==SC_GAS||
+ ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000))
parts[r>>8].type--;
}
}
@@ -1903,7 +1907,7 @@ player[23] = 1;
parts[i].type = PT_NBLE;
parts[i].life = 0;
}
- if (t==PT_FIRE && parts[i].life <=1)
+ if (t==PT_FIRE && parts[i].life <=1 && parts[i].temp<673)
{
t = parts[i].type = PT_SMKE;
parts[i].life = rand()%20+250;
diff --git a/powder.h b/powder.h
index 6cad71c..b69ec5b 100644
--- a/powder.h
+++ b/powder.h
@@ -309,7 +309,7 @@ static part_state pstates[PT_NUM] =
/* LCRY */ {ST_SOLID, PT_NONE, 0.0f, PT_BGLA, 1273.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* STKM */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 620.0f},
/* SWCH */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
- /* SMKE */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 673.0f},
+ /* SMKE */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* DESL */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 335.0f},
/* COAL */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* LO2 */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_O2, 453.0f, PT_NONE, 0.0f},