diff options
| author | Simon <simon@hardwired.org.uk> | 2010-12-24 15:04:48 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-12-24 15:04:48 (GMT) |
| commit | 8f22758990aef05c1e9e74216b507ec87ccd3cb6 (patch) | |
| tree | 969b92940a15e82368943cfbcaf34408aa75b1fd /src | |
| parent | 1983512b3df7c6b3500a3618832ed9296a1ac215 (diff) | |
| download | powder-8f22758990aef05c1e9e74216b507ec87ccd3cb6.zip powder-8f22758990aef05c1e9e74216b507ec87ccd3cb6.tar.gz | |
More awesome
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c index a386281..9272b90 100644 --- a/src/powder.c +++ b/src/powder.c @@ -133,6 +133,10 @@ int try_move(int i, int x, int y, int nx, int ny) return 1; e = eval_move(parts[i].type, nx, ny, &r); + + if((pmap[ny][nx]&0xFF)==PT_BOMB && parts[i].type==PT_BOMB && parts[i].tmp == 1) + e = 2; + if((pmap[ny][nx]&0xFF)==PT_INVIS && (pv[ny/CELL][nx/CELL]>4.0f ||pv[ny/CELL][nx/CELL]<-4.0f)) return 1; /* half-silvered mirror */ @@ -2824,17 +2828,19 @@ void update_particles_i(pixel *vid, int start, int inc) parts[nb].tmp = 1; parts[nb].life = 50; parts[nb].temp = MAX_TEMP; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; } } for(nxj=-rad; nxj<=rad; nxj++) for(nxi=-rad; nxi<=rad; nxi++) if((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1){ delete_part(x+nxi, y+nxj); - pv[(y+nxj)/CELL][(x+nxi)/CELL] += 1.0f; + pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; int nb = create_part(-1, x+nxi, y+nxj, PT_BOMB); if(nb!=-1){ parts[nb].tmp = 2; - parts[nb].life = 1; + parts[nb].life = 2; parts[nb].temp = MAX_TEMP; } } |
