diff --git a/src/elements/O2.c b/src/elements/O2.c index 8b9cecea7..37dcd8d72 100644 --- a/src/elements/O2.c +++ b/src/elements/O2.c @@ -49,14 +49,14 @@ int update_O2(UPDATE_FUNC_ARGS) if (rand()%5 < 1) { int j; - part_change_type(i,x,y,PT_PLSM); - parts[i].life = rand()%150+50; + create_part(i,x,y,PT_BRMT); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = 15000; j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) parts[j].temp = 15000; - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_BRMT); if (j != -1) parts[j].temp = 15000; - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = rand()%25+50; } + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM); if (j != -1) parts[j].temp = 15000; + if (rand()%5 < 2) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = rand()%25+50; } } - parts[i].temp += 15000; + parts[i].temp = 15000; pv[y/CELL][x/CELL] += 300; } } diff --git a/src/elements/co2.c b/src/elements/co2.c index adf85f574..486269eb4 100644 --- a/src/elements/co2.c +++ b/src/elements/co2.c @@ -50,15 +50,14 @@ int update_CO2(UPDATE_FUNC_ARGS) { if (rand()%5 < 1) { int j; - kill_part(i); + create_part(i,x,y,PT_O2); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = 15000; if (!(rand()%50)) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = 15000; } - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_O2); if (j != -1) parts[j].temp = 15000; - if (rand()%1000 < 1) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = 3; } } + //if (rand()%1000 < 1) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = 3; } } - parts[i].temp += 15000; + parts[i].temp = 15000; pv[y/CELL][x/CELL] += 100; - return 1; } } return 0; diff --git a/src/elements/h2.c b/src/elements/h2.c index 86c3be3dc..5be3eccfd 100644 --- a/src/elements/h2.c +++ b/src/elements/h2.c @@ -58,14 +58,13 @@ int update_H2(UPDATE_FUNC_ARGS) { int j; float temp = parts[i].temp; - part_change_type(i,x,y,PT_PLSM); - parts[i].life = rand()%150+50; + create_part(i,x,y,PT_NBLE); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = temp; if (!(rand()%10)) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp; } - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); if (j != -1) parts[j].temp = temp; + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM); if (j != -1) parts[j].temp = temp; if (rand()%2) { @@ -73,7 +72,7 @@ int update_H2(UPDATE_FUNC_ARGS) if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } } - parts[i].temp += 750+rand()%500; + parts[i].temp = temp+750+rand()%500; pv[y/CELL][x/CELL] += 30; } } diff --git a/src/elements/nble.c b/src/elements/nble.c index 0c118ede2..31f6fc847 100644 --- a/src/elements/nble.c +++ b/src/elements/nble.c @@ -23,17 +23,15 @@ int update_NBLE(UPDATE_FUNC_ARGS) { int j; float temp = parts[i].temp; - part_change_type(i,x,y,PT_PLSM); - parts[i].life = rand()%150+50; + create_part(i,x,y,PT_CO2); + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = temp; if (!(rand()%25)) { j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp; } - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } - j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2); - if (j != -1) parts[j].temp = temp; + j = create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM); if (j != -1) parts[j].temp = temp; - parts[i].temp += 1750+rand()%500; + parts[i].temp = temp+1750+rand()%500; pv[y/CELL][x/CELL] += 50; } } diff --git a/src/powder.c b/src/powder.c index 6a7d68d30..0e528fd94 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2918,7 +2918,7 @@ void update_particles(pixel *vid)//doesn't update the particles themselves, but pmap[y][x] = t|(i<<8); // Count number of particles at each location, for excess stacking check // (there are a few exceptions, including energy particles - currently no limit on stacking those) - if (t!=PT_THDR && t!=PT_EMBR && t!=PT_FIGH) + if (t!=PT_THDR && t!=PT_EMBR && t!=PT_FIGH && t!=PT_PLSM) pmap_count[y][x]++; } }