summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ACEL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/ACEL.cpp')
-rw-r--r--src/simulation/elements/ACEL.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/simulation/elements/ACEL.cpp b/src/simulation/elements/ACEL.cpp
index 8dfad79..81eeaf3 100644
--- a/src/simulation/elements/ACEL.cpp
+++ b/src/simulation/elements/ACEL.cpp
@@ -62,8 +62,17 @@ int Element_ACEL::update(UPDATE_FUNC_ARGS)
continue;
if(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY))
{
- parts[r>>8].vx *= 1.1f;
- parts[r>>8].vy *= 1.1f;
+ if (parts[i].ctype)
+ {
+ int change = parts[i].ctype > 1000 ? 1000 : parts[i].ctype < 0 ? 0 : parts[i].ctype;
+ parts[r>>8].vx *= 1+change/100.0f;
+ parts[r>>8].vy *= 1+change/100.0f;
+ }
+ else
+ {
+ parts[r>>8].vx *= 1.1f;
+ parts[r>>8].vy *= 1.1f;
+ }
parts[i].tmp = 1;
}
}