diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-11-10 21:28:56 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 12:46:47 (GMT) |
| commit | 05fbb924204e48188b3f5f5f6cdce60816472417 (patch) | |
| tree | 3a25a52b7d0c584610f6d0a9b5c2913a9eafacb9 /src/elements | |
| parent | 93dc4cc47775013c11d5b0c40ddb2a9cbaa28e98 (diff) | |
| download | powder-05fbb924204e48188b3f5f5f6cdce60816472417.zip powder-05fbb924204e48188b3f5f5f6cdce60816472417.tar.gz | |
Make PIPE reset (ready to generate pattern) when ctype is cleared and life is 0
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/pipe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/elements/pipe.c b/src/elements/pipe.c index 3ee5262..3f370a1 100644 --- a/src/elements/pipe.c +++ b/src/elements/pipe.c @@ -191,14 +191,16 @@ int update_PIPE(UPDATE_FUNC_ARGS) { // make a border for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) + { if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) { r = pmap[y+ry][x+rx]; if (!r) create_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND } - if (parts[i].life==1) - parts[i].ctype = 1; + } + if (parts[i].life<=1) + parts[i].ctype = 1; } } else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern |
