From 719ad7c3595686d817e97e3235cb8eb755d9fc40 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 5 Sep 2010 11:44:22 +0100 Subject: [PATCH] Fire only turns into smoke when cold, fix neutrons --- powder.c | 8 ++++++-- powder.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/powder.c b/powder.c index 53f84c6fb..550f5b1f0 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 6cad71ce1..b69ec5b75 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},