diff options
| author | jacob1 <jfu614@gmail.com> | 2013-03-13 19:54:34 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-03-13 19:54:34 (GMT) |
| commit | e493cf8a475baf2032f879b4c37a6b1ac1b51b54 (patch) | |
| tree | 78d068526f3ea4ed6a2eb5be4c808349b906152e /src/simulation/elements/VIBR.cpp | |
| parent | 7a055a9d90ea3464bbdc314df423e2aa768ce2be (diff) | |
| download | powder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.zip powder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.tar.gz | |
fix all tab spacing issues in all the element files
Diffstat (limited to 'src/simulation/elements/VIBR.cpp')
| -rw-r--r-- | src/simulation/elements/VIBR.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp index a5ad8b1..ee57565 100644 --- a/src/simulation/elements/VIBR.cpp +++ b/src/simulation/elements/VIBR.cpp @@ -99,7 +99,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) { int random = rand(); rx = random%7-3; ry = (random>>3)%7-3; - if(x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES) + if(BOUNDS_CHECK) { r = pmap[y+ry][x+rx]; if ((r&0xFF) && (r&0xFF)!=PT_VIBR && (r&0xFF)!=PT_BVBR && sim->elements[r&0xFF].HeatConduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10)) @@ -133,7 +133,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) { //Neighbor check loop for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) + if (BOUNDS_CHECK && (rx || ry)) { r = pmap[y+ry][x+rx]; if (!r) @@ -166,7 +166,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) { int random = rand(); rx = random%7-3; ry = (random>>3)%7-3; - if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) + if (BOUNDS_CHECK && (rx || ry)) { r = pmap[y+ry][x+rx]; if ((r&0xFF) != PT_VIBR && (r&0xFF) != PT_BVBR) |
