summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/beam.cc8
-rw-r--r--crawl-ref/source/beam.h11
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/view.cc4
4 files changed, 9 insertions, 16 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 3b2975a0fb..b07d1b6c53 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1355,7 +1355,9 @@ void fire_beam( bolt &pbolt, item_def *item )
// BEGIN bounce case
if (!isBouncy(pbolt, grd[tx][ty]))
{
- ray.regress(pbolt.target());
+ do
+ ray.regress();
+ while (grid_is_solid(grd(ray.pos())));
tx = ray.x();
ty = ray.y();
break; // breaks from line tracing
@@ -1365,7 +1367,9 @@ void fire_beam( bolt &pbolt, item_def *item )
// bounce
do {
- ray.regress(pbolt.target());
+ do
+ ray.regress();
+ while (grid_is_solid(grd(ray.pos())));
ray.advance_and_bounce();
--rangeRemaining;
} while ( rangeRemaining > 0 &&
diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h
index 3ba47b3abc..2db36672fe 100644
--- a/crawl-ref/source/beam.h
+++ b/crawl-ref/source/beam.h
@@ -71,17 +71,6 @@ void poison_monster( struct monsters *monster, kill_category who,
/* ***********************************************************************
- * called from: fight - monstuff - spells - spells1 - spells2
- * *********************************************************************** */
-#if 0
-void delete_cloud( int cloud );
-void new_cloud( int cloud, int type, int x, int y, int decay );
-
-void place_cloud(unsigned char cl_type, unsigned char ctarget_x, unsigned char ctarget_y, unsigned char cl_range);
-#endif
-
-
-/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
void fire_tracer( const monsters *monster, struct bolt &pbolt );
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 6f8bc22958..3f2114ac50 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -372,7 +372,7 @@ public:
int advance(bool shorten = false, const coord_def *p = NULL);
int advance_through(const coord_def &point);
void advance_and_bounce();
- void regress(const coord_def &point);
+ void regress();
private:
int raw_advance();
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 2dc27b5047..536e5054b9 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1405,11 +1405,11 @@ void ray_def::advance_and_bounce()
set_reflect_point(oldaccx, oldaccy, &accx, &accy, blocked_x, blocked_y);
}
-void ray_def::regress(const coord_def &point)
+void ray_def::regress()
{
int opp_quadrant[4] = { 2, 3, 0, 1 };
quadrant = opp_quadrant[quadrant];
- advance(true, &point);
+ advance(false);
quadrant = opp_quadrant[quadrant];
}