From 02d21aeaf64d545ff1b76e4c6efe0a180321338a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=28=C2=B4=E3=83=BB=CF=89=E3=83=BB=EF=BD=80=29?= Date: Sat, 26 Dec 2020 18:16:21 +0900 Subject: [PATCH] Hopefully the trash image is removed from the high voltage transmission line bridge --- obj/leitung2.cc | 8 ++++++++ obj/leitung2.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/obj/leitung2.cc b/obj/leitung2.cc index dc8c617afe0..067534f95bb 100644 --- a/obj/leitung2.cc +++ b/obj/leitung2.cc @@ -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 diff --git a/obj/leitung2.h b/obj/leitung2.h index 59610705e0f..bfb0a47013d 100644 --- a/obj/leitung2.h +++ b/obj/leitung2.h @@ -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;} /**