diff options
| author | Cracker64 <cracker642@gmail.com> | 2010-12-13 01:13:05 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2010-12-13 01:13:05 (GMT) |
| commit | 23f828135a21831adeb5511eb59b6dd2105baf27 (patch) | |
| tree | 6b5c0c5f09b174d9a2d36c558457890aae64c4d1 /src/powder.c | |
| parent | af72702434b11a57576ffbafb9112201c092dbae (diff) | |
| download | powder-23f828135a21831adeb5511eb59b6dd2105baf27.zip powder-23f828135a21831adeb5511eb59b6dd2105baf27.tar.gz | |
updated with icons, and some more fixes.
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/powder.c b/src/powder.c index 34352f5..70bb269 100644 --- a/src/powder.c +++ b/src/powder.c @@ -852,7 +852,7 @@ inline int parts_avg(int ci, int ni,int t) int nearest_part(int ci, int t) { - int distance = sqrt(pow(XRES, 2)+pow(YRES, 2)); + int distance = MAX_DISTANCE; int ndistance = 0; int id = -1; int i = 0; @@ -2604,15 +2604,11 @@ void update_particles_i(pixel *vid, int start, int inc) continue; if(parts[r>>8].type!=PT_WARP&&parts[r>>8].type!=PT_STKM&&parts[r>>8].type!=PT_DMND&&parts[r>>8].type!=PT_CLNE&&parts[r>>8].type!=PT_BCLN&&parts[r>>8].type!=PT_PCLN&&(10>=rand()%200)) { - t = parts[i].type = parts[r>>8].type; - parts[i].ctype = parts[r>>8].ctype; - parts[i].life = parts[r>>8].life; - parts[i].tmp = parts[r>>8].tmp; - parts[i].temp = parts[r>>8].temp; - parts[i].vx = parts[r>>8].vx; - parts[i].vy = parts[r>>8].vy; - parts[r>>8].type = PT_WARP; - parts[r>>8].life = rand()%90+1; + parts[i].x = parts[r>>8].x; + parts[i].y = parts[r>>8].y; + parts[r>>8].x = x; + parts[r>>8].y = y; + parts[i].life += 4; trade = 5; } } |
