summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-23 10:53:22 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-23 10:53:22 +0000
commitcd68f3adfe9c445eeb6889bba90c0023b45d67c2 (patch)
tree2a63ff10ed1b80419782fe8df55c36e3e292bdd4
parentf2ae520a7073d7fe0e15cbe7e6b784dc93cc0cfe (diff)
downloadcrawl-ref-cd68f3adfe9c445eeb6889bba90c0023b45d67c2.tar.gz
crawl-ref-cd68f3adfe9c445eeb6889bba90c0023b45d67c2.zip
[1601349] Fixed LOS not affecting square the player stands on.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@480 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/view.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 88f979d691..21e5e69dd2 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1609,6 +1609,9 @@ void losight(FixedArray < unsigned int, 19, 19 > &sh,
}
}
}
+
+ // [dshaligram] The player's current position is always visible.
+ sh[sh_xo][sh_yo] = gr[x_p][y_p];
}
@@ -3429,6 +3432,19 @@ void viewwindow(bool draw_it, bool do_updates)
}
else if (gx == you.x_pos && gy == you.y_pos)
{
+ const int ex = gx - you.x_pos + 9;
+ const int ey = gy - you.y_pos + 9;
+
+ int object = env.show[ex][ey];
+ unsigned short colour = env.show_col[ex][ey];
+ unsigned short ch;
+ get_symbol( object, &ch, &colour );
+
+ set_envmap_char( gx, gy, ch );
+ set_terrain_seen( gx, gy );
+ set_envmap_detected_mons(gx, gy, false);
+ set_envmap_detected_item(gx, gy, false);
+
// player overrides everything in cell
buffy[bufcount] = you.symbol;
buffy[bufcount + 1] = you.colour;
@@ -3440,11 +3456,6 @@ void viewwindow(bool draw_it, bool do_updates)
else
buffy[bufcount + 1] = CYAN;
}
-
- set_envmap_char( gx, gy, buffy[bufcount] );
- set_terrain_seen( gx, gy );
- set_envmap_detected_mons(gx, gy, false);
- set_envmap_detected_item(gx, gy, false);
}
else
{