diff options
| author | Simon <simon@hardwired.org.uk> | 2010-09-05 10:44:22 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-09-05 10:44:22 (GMT) |
| commit | 719ad7c3595686d817e97e3235cb8eb755d9fc40 (patch) | |
| tree | a0c76cc13579b66d229ff343f322180a08b03e41 | |
| parent | 240eb4ba33f8720de6d2a40fd0302ad5f927dc79 (diff) | |
| download | powder-719ad7c3595686d817e97e3235cb8eb755d9fc40.zip powder-719ad7c3595686d817e97e3235cb8eb755d9fc40.tar.gz | |
Fire only turns into smoke when cold, fix neutrons
| -rw-r--r-- | powder.c | 8 | ||||
| -rw-r--r-- | powder.h | 2 |
2 files changed, 7 insertions, 3 deletions
@@ -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; @@ -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}, |
