diff --git a/includes/powder.h b/includes/powder.h index 1d0f392fb..c402dbe2e 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -618,7 +618,7 @@ static const part_type ptypes[PT_NUM] = {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, - {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, + {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, {"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, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, {"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, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, {"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, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BOMB, &graphics_BOMB}, diff --git a/src/elements/aray.c b/src/elements/aray.c index 539b5a64d..22ee26cf2 100644 --- a/src/elements/aray.c +++ b/src/elements/aray.c @@ -27,6 +27,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { parts[nr].life = 2; } else parts[nr].ctype = colored; + parts[nr].temp = parts[i].temp; } } else if (!destroy) { if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red diff --git a/src/elements/pipe.c b/src/elements/pipe.c index 3f370a1ea..afb4b4e52 100644 --- a/src/elements/pipe.c +++ b/src/elements/pipe.c @@ -130,6 +130,8 @@ int update_PIPE(UPDATE_FUNC_ARGS) { if (x+rx>=0 && y+ry>=0 && x+rxctype==2) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - else if (cpart->ctype==3) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - else if (cpart->ctype==4) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - else if (cpart->temp<272.15&&cpart->ctype!=1) - { - if (cpart->temp>173.25&&cpart->temp<273.15) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - if (cpart->temp>73.25&&cpart->temp<=173.15) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - if (cpart->temp>=0&&cpart->temp<=73.15) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - } + if ((cpart->tmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF].pcolors); //*colb = PIXB(ptypes[cpart->tmp&0xFF].pcolors); } + else + { + if (cpart->ctype==2) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + else if (cpart->ctype==3) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + else if (cpart->ctype==4) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + else if (cpart->temp<272.15&&cpart->ctype!=1) + { + if (cpart->temp>173.25&&cpart->temp<273.15) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + if (cpart->temp>73.25&&cpart->temp<=173.15) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + if (cpart->temp>=0&&cpart->temp<=73.15) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + } + } return 0; } diff --git a/src/powder.c b/src/powder.c index c03da983c..c7d526fec 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2250,6 +2250,17 @@ killed: continue; } r = pmap[fin_y][fin_x]; + + if ((r & 0xFF) == PT_PIPE && !(parts[r>>8].tmp&0xFF)) + { + parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | parts[i].type; + parts[r>>8].temp = parts[i].temp; + parts[r>>8].flags = parts[i].life; + parts[r>>8].pavg[0] = parts[i].tmp; + parts[r>>8].pavg[1] = parts[i].ctype; + kill_part(i); + continue; + } // this should be replaced with a particle type attribute ("photwl" or something) if ((r & 0xFF) == PT_PSCN) parts[i].ctype = 0x00000000;