diff --git a/includes/defines.h b/includes/defines.h index 1827ecad6..4e0304a23 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -106,6 +106,7 @@ typedef struct stamp stamp; int MSIGN; int NGOL; int CGOL; +int GSPEED; int gol[XRES][YRES]; extern sign signs[MAXSIGNS]; extern stamp stamps[STAMP_MAX]; diff --git a/includes/powder.h b/includes/powder.h index 10758a076..75fa7285f 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -285,7 +285,7 @@ static const part_type ptypes[PT_NUM] = {"HSWC", PIXPACK(0x3B1010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", TYPE_SOLID}, {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 0, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrlosis of WATR", TYPE_SOLID}, {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 0, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Steam Train.", TYPE_PART}, - {"GOL", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Game Of Life!", TYPE_SOLID}, + {"GOL", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_SPECIAL, 9000.0f, 0, "Game Of Life!", TYPE_SOLID}, //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins(real world, by triclops200) Description }; diff --git a/src/main.c b/src/main.c index 89267163c..36efa8899 100644 --- a/src/main.c +++ b/src/main.c @@ -104,6 +104,7 @@ int FPSB = 0; int MSIGN =-1; int NGOL = 0; int CGOL = 0; +int GSPEED = 1; sign signs[MAXSIGNS]; diff --git a/src/powder.c b/src/powder.c index 911dbf9fc..b4aeebb5f 100644 --- a/src/powder.c +++ b/src/powder.c @@ -824,7 +824,7 @@ void update_particles_i(pixel *vid, int start, int inc) int starti = (start*-1); if(sys_pause&&!framerender) return; - if(CGOL>=8) + if(CGOL>=GSPEED) { CGOL = 0; create_part(-1,0,0,PT_GOL); @@ -862,7 +862,7 @@ void update_particles_i(pixel *vid, int start, int inc) for(nx=0;nx=5){ + if(gol[nx][ny]>=5&&(parts[r>>8].type==PT_NONE||parts[r>>8].type==PT_GOL)){ parts[r>>8].type=PT_NONE; } else if(gol[nx][ny]==3){ @@ -871,7 +871,7 @@ void update_particles_i(pixel *vid, int start, int inc) else if(gol[nx][ny]==2&&parts[r>>8].type==PT_GOL){ parts[r>>8].type=PT_NONE; } - else if(gol[nx][ny]==1){ + else if(gol[nx][ny]==1&&(parts[r>>8].type==PT_NONE||parts[r>>8].type==PT_GOL)){ parts[r>>8].type=PT_NONE; } gol[nx][ny]=0; @@ -1843,6 +1843,11 @@ void update_particles_i(pixel *vid, int start, int inc) else if(t==PT_MORT) { create_part(-1, x, y-1, PT_SMKE); } + else if(t==PT_GOL) + { + if(parts[i].temp>0) + parts[i].temp -= 50.0f; + } else if(t==PT_LCRY) { for(nx=-1; nx<2; nx++)