summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick-p.cc
diff options
context:
space:
mode:
authorPete Hurst <pete@streamuniverse.tv>2013-05-23 12:19:16 +0100
committerPete Hurst <pete@streamuniverse.tv>2013-05-23 12:19:16 +0100
commit855288b3e9be0d5e8a1e0669d692706ab457c3b9 (patch)
treec41334d3f7fb5a53a23654289825b8e04e385892 /crawl-ref/source/tilepick-p.cc
parentf6ca793a7debe551ddf0febfd8efa83e2a6104a1 (diff)
downloadcrawl-ref-855288b3e9be0d5e8a1e0669d692706ab457c3b9.tar.gz
crawl-ref-855288b3e9be0d5e8a1e0669d692706ab457c3b9.zip
Display a different overlay when player or monster held by a web
For now it's a semi-transparent version of a normal web. It doesn't look perfect but a fully-opaque version almost completely masked the image underneath. Should perhaps get a new image for this, with thinner strands and no or thinner outline. player_caught_in_net no longer calls redraw_screen - otherwise there would be a glimpse of a web over the player before the item on the ground both existed and was set as "stationary" to mark it as the trapping net (for thrown nets). The screen seems to get redrawn shortly after anyway.
Diffstat (limited to 'crawl-ref/source/tilepick-p.cc')
-rw-r--r--crawl-ref/source/tilepick-p.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/tilepick-p.cc b/crawl-ref/source/tilepick-p.cc
index 55bfdc4d3c..a0238ace02 100644
--- a/crawl-ref/source/tilepick-p.cc
+++ b/crawl-ref/source/tilepick-p.cc
@@ -15,6 +15,7 @@
#include "tiledoll.h"
#include "tilepick.h"
#include "transform.h"
+#include "traps.h"
static tileidx_t _modrng(int mod, tileidx_t first, tileidx_t last)
{
@@ -553,7 +554,12 @@ tileidx_t tileidx_player()
ch |= TILE_FLAG_FLYING;
if (you.attribute[ATTR_HELD])
- ch |= TILE_FLAG_NET;
+ {
+ if (get_trapping_net(you.pos()) == NON_ITEM)
+ ch |= TILE_FLAG_WEB;
+ else
+ ch |= TILE_FLAG_NET;
+ }
if (you.duration[DUR_POISONING])
ch |= TILE_FLAG_POISON;