summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ACID.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/ACID.cpp')
-rw-r--r--src/simulation/elements/ACID.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp
index fb6cb81..6501ba0 100644
--- a/src/simulation/elements/ACID.cpp
+++ b/src/simulation/elements/ACID.cpp
@@ -102,12 +102,12 @@ int Element_ACID::update(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_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion
+ if ((r&0xFF)==PT_ACID && (parts[i].life>parts[r>>8].life) && parts[i].life>0)//diffusion
{
int temp = parts[i].life - parts[r>>8].life;
- if (temp ==1)
+ if (temp==1)
{
parts[r>>8].life ++;
parts[i].life --;
@@ -141,4 +141,4 @@ int Element_ACID::graphics(GRAPHICS_FUNC_ARGS)
}
-Element_ACID::~Element_ACID() {} \ No newline at end of file
+Element_ACID::~Element_ACID() {}