SHARE
TWEET
CDDA trail line fix
a guest
Oct 27th, 2013
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- diff --git a/animation_curses.cpp b/animation_curses.cpp
- index b727aa5..eabdcfa 100644
- --- a/animation_curses.cpp
- +++ b/animation_curses.cpp
- @@ -66,7 +66,6 @@ void game::draw_hit_player(player *p, bool dead)
- void game::draw_line(const int x, const int y, const point center_point, std::vector<point> ret)
- {
- - if (u_see( x, y))
- {
- for (int i = 0; i < ret.size(); i++)
- {
- diff --git a/animation_tiles.cpp b/animation_tiles.cpp
- index c94beab..afa740c 100644
- --- a/animation_tiles.cpp
- +++ b/animation_tiles.cpp
- @@ -128,7 +128,6 @@ void game::draw_hit_player(player *p, bool dead)
- void game::draw_line(const int x, const int y, const point center_point, std::vector<point> ret)
- {
- - if (u_see( x, y))
- {
- for (int i = 0; i < ret.size(); i++)
- {
- diff --git a/cata_tiles.cpp b/cata_tiles.cpp
- index c074345..bb6fd49 100644
- --- a/cata_tiles.cpp
- +++ b/cata_tiles.cpp
- @@ -1145,7 +1145,6 @@ void cata_tiles::draw_line(int destx, int desty, int centerx, int centery, int w
- {
- int mx = line_pos_x, my = line_pos_y;
- std::string line_overlay = "animation_line";
- - if (!is_target_line || g->u_see(mx,my))
- {
- for (int i = 0; i < line_trajectory.size()-1; i++)
- {
- diff --git a/game.cpp b/game.cpp
- index f5546f8..a4038d5 100644
- --- a/game.cpp
- +++ b/game.cpp
- @@ -6967,10 +6967,7 @@ void game::draw_trail_to_square(int x, int y, bool bDrawX)
- point center = point(u.posx + u.view_offset_x, u.posy + u.view_offset_y);
- std::vector<point> vPoint = line_to(u.posx, u.posy, u.posx + x, u.posy + y, 0);
- - for (int i = 1; i < vPoint.size(); i++)
- - {
- - m.drawsq(w_terrain, u, vPoint[i-1].x, vPoint[i-1].y, true, true, center.x, center.y);
- - }
- + draw_line(x, y, center, vPoint);
- if (bDrawX) {
- mvwputch(w_terrain, POSY + (vPoint[vPoint.size()-1].y - (u.posy + u.view_offset_y)),
- diff --git a/ranged.cpp b/ranged.cpp
- index e0ae2b8..7d699f1 100644
- --- a/ranged.cpp
- +++ b/ranged.cpp
- @@ -768,7 +768,8 @@ std::vector<point> game::target(int &x, int &y, int lowx, int lowy, int hix,
- // Only draw a highlighted trajectory if we can see the endpoint.
- // Provides feedback to the player, and avoids leaking information about tiles they can't see.
- - draw_line(x, y, center, ret);
- + if (u_see(x, y))
- + draw_line(x, y, center, ret);
- /*
- if (u_see( x, y)) {
- for (int i = 0; i < ret.size(); i++) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

