From 6d70d1fdee6d6ffabbc5393af13afeabd0ac2d9c Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 9 Sep 2010 11:55:20 -0400 Subject: [PATCH] Fixed wall eraser errors and loading of other saves. --- main.c | 33 +++++++++++++++++++++++++++++++++ powder.c | 53 ++++++++++++++++++++++++++++------------------------- 2 files changed, 61 insertions(+), 25 deletions(-) diff --git a/main.c b/main.c index 5bdc03a24..5da2ce0ca 100644 --- a/main.c +++ b/main.c @@ -101,6 +101,7 @@ int legacy_enable = 0; //Used to disable new features such as heat, will be set int death = 0, framerender = 0; int amd = 1; int FPSB = 0; +int cracker = 1; sign signs[MAXSIGNS]; @@ -465,7 +466,38 @@ int parse_save(void *save, int size, int replace, int x0, int y0) for(x=bx0; x400&&10>rand()%10000&&parts[i].life==0&&!pmap[y-1][x]) + if(parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x]) { create_part(-1, x , y-1 , PT_FWRK); r = pmap[y-1][x]; - parts[r>>8].vy = rand()%8-22; - parts[r>>8].vx = rand()%20-rand()%20; - parts[r>>8].life=rand()%30+50; - parts[i].type=PT_NONE; + if(parts[r>>8].type==PT_FWRK) + { + parts[r>>8].vy = rand()%8-22; + parts[r>>8].vx = rand()%20-rand()%20; + parts[r>>8].life=rand()%30+50; + parts[i].type=PT_NONE; + } } if(parts[i].life>1) { @@ -1939,6 +1942,8 @@ player[23] = 1; { if(5>=rand()%8) { + if(!pmap[y+ny][x+nx]) + { create_part(-1, x+nx, y+ny , PT_DUST); pv[y/CELL][x/CELL] += 2.00f*CFDS; a= pmap[y+ny][x+nx]; @@ -1952,6 +1957,7 @@ player[23] = 1; parts[a>>8].ctype=e; parts[a>>8].temp= rand()%20+600; } + } } } @@ -2180,7 +2186,7 @@ void update_particles(pixel *vid) { for(x=0; x>1)&1; i>1)&1; i