diff --git a/includes/powder.h b/includes/powder.h index 71bfe01d7..45e818139 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -177,7 +177,8 @@ #define PT_BRAY 127 #define PT_STKM2 128 #define PT_BOMB 129 -#define PT_NUM 130 +#define PT_C5 130 +#define PT_NUM 131 #define R_TEMP 22 #define MAX_TEMP 9999 @@ -400,7 +401,8 @@ static const part_type ptypes[PT_NUM] = {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", TYPE_SOLID, NULL}, {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", 0, NULL}, {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", TYPE_PART, NULL}, - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins Description + {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", TYPE_SOLID | PROP_NEUTPENETRATE, NULL}, + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins Description }; static part_state pstates[PT_NUM] = @@ -536,6 +538,7 @@ static part_state pstates[PT_NUM] = /* BRAY */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* STKM2*/ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 620.0f}, /* BOMB */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, + /* C-5 */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, }; static int grule[NGOL][9] = diff --git a/src/powder.c b/src/powder.c index ce3c4fa03..2c7944e5c 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2792,7 +2792,28 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_BOMB) + else if(t==PT_C5) + { + for(nx=-2; nx<3; nx++) + for(ny=-2; ny<3; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if((parts[r>>8].temp<100 && parts[r>>8].type!=PT_C5)||parts[r>>8].type==PT_HFLM) + { + if(1>rand()%6) + { + t = parts[i].type = PT_HFLM; + parts[r>>8].temp = parts[i].temp = 0; + parts[i].life = rand()%150+50; + pv[y/CELL][x/CELL] += 1.5; + } + } + } + } + else if(t==PT_BOMB) { int nb; if(parts[i].tmp==1){