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.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/simulation/elements/ACEL.cpp b/src/simulation/elements/ACEL.cpp
index 143e195..12f408c 100644
--- a/src/simulation/elements/ACEL.cpp
+++ b/src/simulation/elements/ACEL.cpp
@@ -60,18 +60,18 @@ int Element_ACEL::update(UPDATE_FUNC_ARGS)
{
multiplier = 1.1f;
}
- parts[i].tmp = 0;
- for (rx=-1; rx<2; rx++)
- for (ry=-1; ry<2; ry++)
- if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry) && !(rx && ry))
- {
- r = pmap[y+ry][x+rx];
- if(!r)
- r = sim->photons[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
- continue;
- if(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY))
- {
+ parts[i].tmp = 0;
+ for (rx=-1; rx<2; rx++)
+ for (ry=-1; ry<2; ry++)
+ if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry) && !(rx && ry))
+ {
+ r = pmap[y+ry][x+rx];
+ if(!r)
+ r = sim->photons[y+ry][x+rx];
+ if (!r)
+ continue;
+ if(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY))
+ {
parts[r>>8].vx *= multiplier;
parts[r>>8].vy *= multiplier;
parts[i].tmp = 1;