diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-03-26 04:17:03 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-03-29 17:23:34 (GMT) |
| commit | ed244f42cb4ceb11af936781e336367cfc8ed0e7 (patch) | |
| tree | 8402d1f7182e4242c56959df0477a9bd63f0846a /src/main.c | |
| parent | 812798d70dc5c95e34e4e896d2b10d979b2d6d2e (diff) | |
| download | powder-ed244f42cb4ceb11af936781e336367cfc8ed0e7.zip powder-ed244f42cb4ceb11af936781e336367cfc8ed0e7.tar.gz | |
WIND works with line tool, BOMB shine affected by velocity and flickers
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -3364,6 +3364,16 @@ int main(int argc, char *argv[]) bmap[j][i] = WL_FAN; } } + if (c == PT_WIND) + { + for (j=-bsy; j<=bsy; j++) + for (i=-bsx; i<=bsx; i++) + if (x+i>0 && y+j>0 && x+i<XRES && y+j<YRES && ((CURRENT_BRUSH==CIRCLE_BRUSH && (pow(i,2))/(pow(bsx,2))+(pow(j,2))/(pow(bsy,2))<=1)||(CURRENT_BRUSH==SQUARE_BRUSH&&i*j<=bsy*bsx))) + { + vx[(ly+j)/CELL][(lx+i)/CELL] += (x-lx)*0.002f; + vy[(ly+j)/CELL][(lx+i)/CELL] += (y-ly)*0.002f; + } + } } else if (lm == 2) { |
