Attached Files:
|
temp_flooding_1.patch [^] (2,246 bytes) 2013-06-05 09:26 [Show Content] [Hide Content]From 0954d1b6edaf40bb9c6f998692ba69f4ff39f267 Mon Sep 17 00:00:00 2001
From: Ed Gonzalez <ed.gonzalez3@gmail.com>
Date: Wed, 5 Jun 2013 00:15:40 -0700
Subject: [PATCH] Fix primal wave replacing stairs under the player (#7157)
The central target of the primal wave lost its check on feature type in
the refactoring to temporary terrain code (0aae6b6). Thus the target
square (and only that square) could be replaced regardless of feature.
This also removes unused arguments from _create_feat_splash. Due to the
terrain being flagged by a specific terrain change type, it no longer
makes sense for this to replace to arbitrary features.
The bug where the feature is not restored afterwards is however
unrelated and due to shoals thinking any water square is under the
effect of tides.
---
crawl-ref/source/beam.cc | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index f52a275..e8d5bd0 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2246,14 +2246,14 @@ static coord_def _random_point_hittable_from(const coord_def &c,
}
static void _create_feat_splash(coord_def center,
- dungeon_feature_type overwriteable,
- dungeon_feature_type newfeat,
int radius,
int nattempts)
{
// Always affect center.
- temp_change_terrain(center, DNGN_SHALLOW_WATER, 100 + random2(100),
- TERRAIN_CHANGE_FLOOD);
+ if (grd(center) == DNGN_FLOOR || grd(center) == DNGN_SHALLOW_WATER)
+ temp_change_terrain(center, DNGN_SHALLOW_WATER, 100 + random2(100),
+ TERRAIN_CHANGE_FLOOD);
+
for (int i = 0; i < nattempts; ++i)
{
const coord_def newp(_random_point_hittable_from(center, radius));
@@ -2503,8 +2503,6 @@ void bolt::affect_endpoint()
else
noisy(25, pos(), "You hear a splash.");
_create_feat_splash(pos(),
- DNGN_FLOOR,
- DNGN_SHALLOW_WATER,
2,
random_range(3, 12, 2));
}
--
1.7.10.4
|