diff options
| author | Simon <simon@hardwired.org.uk> | 2010-08-11 11:12:29 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-08-11 11:12:29 (GMT) |
| commit | b33438254d78377f10ccd10a10db590c80807962 (patch) | |
| tree | aa850750568a4dd0a0ef2268cc42da1cc1c46205 /powder.c | |
| parent | af573753cff935bc4086f5551656f48f8c4e83d4 (diff) | |
| download | powder-b33438254d78377f10ccd10a10db590c80807962.zip powder-b33438254d78377f10ccd10a10db590c80807962.tar.gz | |
Fixes to makefile and fixes error in particle_avg function.
Diffstat (limited to 'powder.c')
| -rwxr-xr-x | powder.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1099,7 +1099,7 @@ void set_emap(int x, int y) } int parts_avg(int ci, int ni){ int pmr = pmap[(int)((parts[ci].y + parts[ni].y)/2)][(int)((parts[ci].x + parts[ni].x)/2)]; - return parts[(pmr>>8>=PT_NUM)?PT_NONE:pmr>>8].type; + return parts[(pmr>>8>=NPART)?PT_NONE:pmr>>8].type; } int nearest_part(int ci, int t){ int distance = sqrt(pow(XRES, 2)+pow(YRES, 2)); |
