diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-08-24 15:35:52 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-27 10:37:03 (GMT) |
| commit | 42cfb74c2bb82eb185962a17f848e47265a16316 (patch) | |
| tree | d2185ba1276dd85144b7d26099f597833f0cc975 /src/elements/bcol.c | |
| parent | f97e8e5c7caddadadf71f7635070777c6e1248ad (diff) | |
| download | powder-42cfb74c2bb82eb185962a17f848e47265a16316.zip powder-42cfb74c2bb82eb185962a17f848e47265a16316.tar.gz | |
Remove blocking walls from pmap
2.5% speed increase on a screen full of water
Diffstat (limited to 'src/elements/bcol.c')
| -rw-r--r-- | src/elements/bcol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/bcol.c b/src/elements/bcol.c index bc8713c..aac3ffe 100644 --- a/src/elements/bcol.c +++ b/src/elements/bcol.c @@ -15,7 +15,7 @@ int update_BCOL(UPDATE_FUNC_ARGS) { if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) { r = pmap[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) + if (!r) continue; if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) && 1>(rand()%500)) { @@ -42,7 +42,7 @@ int update_BCOL(UPDATE_FUNC_ARGS) { if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) { r = pmap[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) + if (!r) continue; if (((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL)&&(parts[i].tmp2>parts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion { |
