Skip to content

Commit

Permalink
Hopefully the trash image is removed from the high voltage transmissi…
Browse files Browse the repository at this point in the history
…on line bridge
  • Loading branch information
Ranran-the-JuicyPork committed Dec 26, 2020
1 parent ee201ad commit 02d21ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions obj/leitung2.cc
Expand Up @@ -342,6 +342,14 @@ void leitung_t::calc_image()
}
}

image_id leitung_t::get_image() const
{
grund_t *gr = welt->lookup(get_pos());
if (gr == NULL || gr->ist_bruecke() || is_crossing) {
return IMG_EMPTY;
}
return image;
}

/**
* Recalculates the images of all neighbouring
Expand Down
2 changes: 1 addition & 1 deletion obj/leitung2.h
Expand Up @@ -106,7 +106,7 @@ class leitung_t : public obj_t
ribi_t::ribi get_ribi() const { return ribi; }

inline void set_image( image_id b ) { image = b; }
image_id get_image() const OVERRIDE {return is_crossing ? IMG_EMPTY : image;}
image_id get_image() const OVERRIDE;
image_id get_front_image() const OVERRIDE {return is_crossing ? image : IMG_EMPTY;}

/**
Expand Down

0 comments on commit 02d21ae

Please sign in to comment.