diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-09-02 21:05:40 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-09-02 21:05:40 (GMT) |
| commit | 74aa4333657916283d8b32825e706e146ffd35b8 (patch) | |
| tree | 56676d624a6a7ad92266fba3f84c583d8c42b6d3 /src | |
| parent | 2932b04e0e123bb06e958bd6b7f3d2767afdff0b (diff) | |
| download | powder-74aa4333657916283d8b32825e706e146ffd35b8.zip powder-74aa4333657916283d8b32825e706e146ffd35b8.tar.gz | |
Change air tools to only act inside the brush, not in surrounding cells as well
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/powder.c b/src/powder.c index 71e8596..9f1970e 100644 --- a/src/powder.c +++ b/src/powder.c @@ -791,28 +791,12 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a } if (t==SPC_AIR) { - pv[y/CELL][x/CELL] += 0.03f; - if (y+CELL<YRES) - pv[y/CELL+1][x/CELL] += 0.03f; - if (x+CELL<XRES) - { - pv[y/CELL][x/CELL+1] += 0.03f; - if (y+CELL<YRES) - pv[y/CELL+1][x/CELL+1] += 0.03f; - } + pv[y/CELL][x/CELL] += 0.10f; return -1; } if (t==SPC_VACUUM) { - pv[y/CELL][x/CELL] -= 0.03f; - if (y+CELL<YRES) - pv[y/CELL+1][x/CELL] -= 0.03f; - if (x+CELL<XRES) - { - pv[y/CELL][x/CELL+1] -= 0.03f; - if (y+CELL<YRES) - pv[y/CELL+1][x/CELL+1] -= 0.03f; - } + pv[y/CELL][x/CELL] -= 0.10f; return -1; } if (t==SPC_PGRV) |
