Fire only turns into smoke when cold, fix neutrons

This commit is contained in:
Simon
2010-09-05 11:44:22 +01:00
parent 240eb4ba33
commit 719ad7c359
2 changed files with 7 additions and 3 deletions

View File

@@ -1187,7 +1187,11 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].type = PT_GAS; parts[r>>8].type = PT_GAS;
if((r&0xFF)==PT_COAL && 5>(rand()%100)) if((r&0xFF)==PT_COAL && 5>(rand()%100))
parts[r>>8].type = PT_WOOD;*/ 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--; parts[r>>8].type--;
} }
} }
@@ -1903,7 +1907,7 @@ player[23] = 1;
parts[i].type = PT_NBLE; parts[i].type = PT_NBLE;
parts[i].life = 0; 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; t = parts[i].type = PT_SMKE;
parts[i].life = rand()%20+250; parts[i].life = rand()%20+250;

View File

@@ -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}, /* 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}, /* 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}, /* 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}, /* 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}, /* 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}, /* LO2 */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_O2, 453.0f, PT_NONE, 0.0f},