summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ray.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-11 17:50:44 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-11 18:05:00 +0200
commit76155fcf6ab0806582f42694e42f87dcb57938fd (patch)
tree8d20e6220e3eca6ad45bcee454bc4ebab1b6c10c /crawl-ref/source/ray.cc
parent4b84fa4805af04d59d98eba0425be894831e7383 (diff)
downloadcrawl-ref-76155fcf6ab0806582f42694e42f87dcb57938fd.tar.gz
crawl-ref-76155fcf6ab0806582f42694e42f87dcb57938fd.zip
Simplify quadrant mirroring in ray_def::raw_advance.
Diffstat (limited to 'crawl-ref/source/ray.cc')
-rw-r--r--crawl-ref/source/ray.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/ray.cc b/crawl-ref/source/ray.cc
index 604d448c80..ca7ac771c2 100644
--- a/crawl-ref/source/ray.cc
+++ b/crawl-ref/source/ray.cc
@@ -314,23 +314,23 @@ int ray_def::raw_advance()
break;
case 1:
// going down-left
- accx = 100.0 - EPSILON_VALUE/10.0 - accx;
+ accx *= -1;
rc = _find_next_intercept();
- accx = 100.0 - EPSILON_VALUE/10.0 - accx;
+ accx *= -1;
break;
case 2:
// going up-left
- accx = 100.0 - EPSILON_VALUE/10.0 - accx;
- accy = 100.0 - EPSILON_VALUE/10.0 - accy;
+ accx *= -1;
+ accy *= -1;
rc = _find_next_intercept();
- accx = 100.0 - EPSILON_VALUE/10.0 - accx;
- accy = 100.0 - EPSILON_VALUE/10.0 - accy;
+ accx *= -1;
+ accy *= -1;
break;
case 3:
// going up-right
- accy = 100.0 - EPSILON_VALUE/10.0 - accy;
+ accy *= -1;
rc = _find_next_intercept();
- accy = 100.0 - EPSILON_VALUE/10.0 - accy;
+ accy *= -1;
break;
default:
rc = -1;