summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2012-10-29 01:11:18 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2012-10-29 01:11:18 (GMT)
commit32bdcb89e8609b43e24493d54c57d0fb552a5331 (patch)
tree9ac7cc4155a40acef76a1c6ef0344e3144154a05 /src/simulation/elements
parentcaf262ed60f6c7d7dfc1fa41c1c0a771484792ab (diff)
downloadpowder-32bdcb89e8609b43e24493d54c57d0fb552a5331.zip
powder-32bdcb89e8609b43e24493d54c57d0fb552a5331.tar.gz
VIBR fixes
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/VIBR.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp
index 370c69f..02c97fa 100644
--- a/src/simulation/elements/VIBR.cpp
+++ b/src/simulation/elements/VIBR.cpp
@@ -161,11 +161,13 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
sim->pv[y/CELL][x/CELL]=200;
}
//Neighbor check loop
- for (rx=-2; rx<3; rx++)
- for (ry=-2; ry<3; ry++)
+ for (rx=-3; rx<4; rx++)
+ for (ry=-3; ry<4; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
+ if (!r || (r & (abs(rx) == 3 || abs(ry) == 3)) )
+ r = sim->photons[y+ry][x+rx];
if (!r)
continue;
//Melts into EXOT
@@ -229,4 +231,4 @@ int Element_VIBR::graphics(GRAPHICS_FUNC_ARGS)
return 0;
}
-Element_VIBR::~Element_VIBR() {} \ No newline at end of file
+Element_VIBR::~Element_VIBR() {}