diff --git a/includes/defines.h b/includes/defines.h index 8fb8fc85a..1c20fb4a0 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -10,7 +10,7 @@ #define SAVE_VERSION 46 #define MINOR_VERSION 4 #define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter. -//#define BETA +#define BETA #define SERVER "powdertoy.co.uk" diff --git a/src/elements/prto.c b/src/elements/prto.c index fbbd5a13f..5bf6efef5 100644 --- a/src/elements/prto.c +++ b/src/elements/prto.c @@ -6,8 +6,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) { parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; else if (parts[i].tmp<0) parts[i].tmp = 0; - for (rx=1; rx>-2; rx--) - for (ry=1; ry>-2; ry--) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>0 && x+rx=(XRES+BARSIZE-(510-385)) && x<=(XRES+BARSIZE-(510-476))) { @@ -2461,7 +2471,7 @@ int main(int argc, char *argv[]) { if (sdl_mod & (KMOD_CAPS)) c = 0; - if (c!=WL_STREAM+100&&c!=SPC_AIR&&c!=SPC_HEAT&&c!=SPC_COOL&&c!=SPC_VACUUM&&c!=PT_WIND&&!REPLACE_MODE) + if (c!=WL_STREAM+100&&c!=SPC_AIR&&c!=SPC_HEAT&&c!=SPC_COOL&&c!=SPC_VACUUM&&!REPLACE_MODE&&c!=PT_WIND) flood_parts(x, y, c, -1, -1); if (c==SPC_HEAT || c==SPC_COOL) create_parts(x, y, bsx, bsy, c); @@ -2809,7 +2819,8 @@ int process_command(pixel *vid_buf,char *console,char *console_error) { ny = 0; j = 0; m = 0; - console_parse_coords(console4, &nx , &ny, console_error); + if(console4) + console_parse_coords(console4, &nx , &ny, console_error); memset(pch,0,sizeof(pch)); memset(fileread,0,sizeof(fileread)); fread(fileread,1,5000,f); diff --git a/src/powder.c b/src/powder.c index 523b99088..af59585fe 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1122,7 +1122,7 @@ int nearest_part(int ci, int t) void update_particles_i(pixel *vid, int start, int inc) { - int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors; + int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors, createdsomething; float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp, ctemph, ctempl; int fin_x, fin_y, clear_x, clear_y; float fin_xf, fin_yf, clear_xf, clear_yf; @@ -1329,14 +1329,14 @@ void update_particles_i(pixel *vid, int start, int inc) if(neighbors==0 || !(ptypes[r&0xFF].properties&PROP_LIFE || !(r&0xFF)) || (r>>8)>=NPART) continue; for ( golnum = 1; golnum<=NGOL; golnum++) - for ( goldelete = 0; goldelete<9; goldelete++) { - if (neighbors==goldelete&&gol[nx][ny]==0&&grule[golnum][goldelete]>=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) + goldelete = neighbors; + if (gol[nx][ny]==0&&grule[golnum][goldelete]>=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) { if (create_part(-1,nx,ny,goltype[golnum-1])) createdsomething = 1; } - else if (neighbors-1==goldelete&&gol[nx][ny]==golnum&&(grule[golnum][goldelete]==0||grule[golnum][goldelete]==2))//subtract 1 because it counted itself + else if (gol[nx][ny]==golnum&&(grule[golnum][goldelete-1]==0||grule[golnum][goldelete-1]==2))//subtract 1 because it counted itself { if(parts[r>>8].tmp==grule[golnum][9]-1) parts[r>>8].tmp --;