summaryrefslogtreecommitdiff
path: root/src/simulation/elements/GEL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/GEL.cpp')
-rw-r--r--src/simulation/elements/GEL.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp
index 2d3baeb..274f7c1 100644
--- a/src/simulation/elements/GEL.cpp
+++ b/src/simulation/elements/GEL.cpp
@@ -98,8 +98,13 @@ int Element_GEL::update(UPDATE_FUNC_ARGS)
per *= 0.1;
dx *= per; dy *= per;
- parts[i].vx += dx; parts[r>>8].vx -= dx;
- parts[i].vy += dy; parts[r>>8].vy -= dy;
+ parts[i].vx += dx;
+ parts[i].vy += dy;
+ if ((sim->elements[r&0xFF].State!=ST_SOLID && sim->elements[r&0xFF].State!=ST_NONE) || (r&0xFF)==PT_GOO)
+ {
+ parts[r>>8].vx -= dx;
+ parts[r>>8].vy -= dy;
+ }
}
}
return 0;
@@ -120,4 +125,4 @@ int Element_GEL::graphics(GRAPHICS_FUNC_ARGS)
-Element_GEL::~Element_GEL() {} \ No newline at end of file
+Element_GEL::~Element_GEL() {}