Index: src/simutrans/dataobj/ribi.cc
===================================================================
--- src/simutrans/dataobj/ribi.cc	(revision 12019)
+++ src/simutrans/dataobj/ribi.cc	(working copy)
@@ -11,7 +11,7 @@
 #include "koord3d.h"
 
 // since we have now a dummy function instead an array
-const ribi_t::_nesw ribi_t::nesw;;
+const ribi_t::_nesw ribi_t::nesw;
 
 // same like the layouts of buildings
 const ribi_t::ribi ribi_t::layout_to_ribi[4] = {
Index: src/simutrans/descriptor/way_desc.h
===================================================================
--- src/simutrans/descriptor/way_desc.h	(revision 12019)
+++ src/simutrans/descriptor/way_desc.h	(working copy)
@@ -182,7 +182,13 @@
 			return IMG_EMPTY;
 		}
 		const uint16 n = image_list_base_index(season, front) + 2;
-		return get_child<image_list_t>(n)->get_image_id(ribi / 3 - 1);
+		if (ribi_t::is_bend(ribi)) {
+			return get_child<image_list_t>(n)->get_image_id(ribi / 3 - 1);
+		}
+		else {
+			// close diagonal graphics
+			return get_child<image_list_t>(n)->get_image_id(ribi_t::is_straight_ns(ribi)+4);
+		}
 	}
 
 	bool has_double_slopes() const {
@@ -195,6 +201,13 @@
 		||     get_child<image_list_t>(image_list_base_index(false, true)+2)->get_image_id(0) != IMG_EMPTY;
 	}
 
+	bool has_close_diagonal_image() const {
+		if (has_diagonal_image()) {
+			return get_child<image_list_t>(4)->get_image_id(4) != IMG_EMPTY
+				|| get_child<image_list_t>(image_list_base_index(false, true) + 2)->get_image_id(5) != IMG_EMPTY;
+		}
+	}
+
 	bool has_switch_image() const {
 		return get_child<image_list_t>(2)->get_count() > 16
 		||     get_child<image_list_t>(image_list_base_index(false, true))->get_count() > 16;
Index: src/simutrans/descriptor/writer/way_writer.cc
===================================================================
--- src/simutrans/descriptor/writer/way_writer.cc	(revision 12019)
+++ src/simutrans/descriptor/writer/way_writer.cc	(working copy)
@@ -205,6 +205,13 @@
 					string str = obj.get(buf);
 					keys.append(str);
 				}
+				// close diagonals
+				sprintf(buf, "%sdiagonal[close1][%d]", image_type[backtofront], season);
+				string str = obj.get(buf);
+				keys.append(str);
+				sprintf(buf, "%sdiagonal[close2][%d]", image_type[backtofront], season);
+				string str = obj.get(buf);
+				keys.append(str);
 				imagelist_writer_t::instance()->write_obj(outfp, node, keys);
 
 				keys.clear();
Index: src/simutrans/obj/way/schiene.cc
===================================================================
--- src/simutrans/obj/way/schiene.cc	(revision 12019)
+++ src/simutrans/obj/way/schiene.cc	(working copy)
@@ -85,7 +85,7 @@
 		 * direction is a diagonal (i.e. on the switching part)
 		 * and there are switching graphics
 		 */
-		if(  ribi_t::is_threeway(get_ribi_unmasked())  &&  ribi_t::is_bend(dir)  &&  get_desc()->has_switch_image()  ) {
+		if(  ribi_t::is_threeway(get_ribi_unmasked())  &&  ribi_t::is_bend(dir)  &&  get_desc()->has_switch_image()  &&  !is_close_diagonal()) {
 			mark_image_dirty( get_image(), 0 );
 			mark_image_dirty( get_front_image(), 0 );
 			set_switched(dir == ribi_t::northeast || dir == ribi_t::southwest);
Index: src/simutrans/obj/way/weg.cc
===================================================================
--- src/simutrans/obj/way/weg.cc	(revision 12019)
+++ src/simutrans/obj/way/weg.cc	(working copy)
@@ -425,6 +425,10 @@
 		return true;
 	}
 
+	if(  is_close_diagonal()  ) {
+		// double diagonals
+		set_images(image_diagonal, is_close_diagonal() == 1 ? ribi_t::northsouth : ribi_t::eastwest, snow);
+	}
 	if(  is_diagonal()  ) {
 		set_images( image_diagonal, ribi, snow );
 	}
@@ -518,11 +522,25 @@
 			set_images(image_slope, hang, snow);
 		}
 		else if (ribi_t::is_threeway(ribi)) {
-			set_images(image_switch, ribi, snow, has_switched());
+			if (ribi_t::all == ribi && desc->has_diagonal_image()) {
+				check_diagonal();
+			}
+			if (!is_close_diagonal()) {
+				set_images(image_switch, ribi, snow, has_switched());
+			}
+			else {
+				if (desc->has_close_diagonal_image()) {
+					set_images(image_diagonal, is_close_diagonal() == 1 ? ribi_t::northsouth : ribi_t::eastwest, snow);
+				}
+				else {
+					set_images(image_diagonal, is_close_diagonal() == 1 ? ribi_t::northwest : ribi_t::southwest, snow);
+				}
+			}
 		}
 		else if (!ribi_t::is_twoway(ribi)) {
+			// essentiall end tiles ... and no ribi tiles
 			set_images(image_flat, ribi, snow);
-			// nide foreground in stations and depots
+			// nice foreground in stations and depots
 			if (foreground_image != IMG_EMPTY) {
 				if (from->is_halt()) {
 					// no foreground in stations
@@ -611,11 +629,11 @@
 void weg_t::check_diagonal()
 {
 	bool diagonal = false;
-	flags &= ~IS_DIAGONAL;
+	flags &= ~(IS_DIAGONAL|IS_CLOSE_DIAGONALS);
 
 	const ribi_t::ribi ribi = get_ribi_unmasked();
-	if(  !ribi_t::is_bend(ribi)  ) {
-		// This is not a curve, it can't be a diagonal
+	if (!ribi_t::is_bend(ribi)  &&  ribi_t::all != ribi) {
+		// every second tile on a close diagonal is a fourway tile
 		return;
 	}
 
@@ -625,6 +643,33 @@
 	ribi_t::ribi r1 = ribi_t::none;
 	ribi_t::ribi r2 = ribi_t::none;
 
+	if (ribi_t::all == ribi) {
+		ribi_t::ribi r[4], r0=0;
+		uint8 non_bent = 0;
+		for (uint8 i = 0; i < 4; i++) {
+			if (!from->get_neighbour(to, get_waytype(), ribi_t::nesw[i])) {
+				dbg->error("weg_t::is_diagonal", "4way ribi not connected at %s", get_pos().get_fullstr());
+				return;
+			}
+			r[i] = to->get_weg_ribi_unmasked(get_waytype());
+			if (!ribi_t::is_bend(r[i])) {
+				// only one entry point
+				if (non_bent++) {
+					return;
+				}
+			}
+		}
+		if (r[0] == r[1] || r[2] == r[3]) {
+			flags |= 2 << 8;
+		}
+		else {
+			flags |= 1 << 8;
+		}
+		return;
+	}
+
+	// from now bends:
+
 	// get the ribis of the ways that connect to us
 	// r1 will be 45 degree clockwise ribi (eg northeast->east), r2 will be anticlockwise ribi (eg northeast->north)
 	if(  from->get_neighbour(to, get_waytype(), ribi_t::rotate45(ribi))  ) {
@@ -635,8 +680,13 @@
 		r2 = to->get_weg_ribi_unmasked(get_waytype());
 	}
 
-	// diagonal if r1 or r2 are our reverse and neither one is 90 degree rotation of us
-	diagonal = (r1 == ribi_t::backward(ribi) || r2 == ribi_t::backward(ribi)) && r1 != ribi_t::rotate90l(ribi) && r2 != ribi_t::rotate90(ribi);
+	if (ribi_t::is_threeway(r1) && ribi_t::is_threeway(r2)) {
+		diagonal = true;
+	}
+	else {
+		// diagonal if r1 or r2 are our reverse and neither one is 90 degree rotation of us
+		diagonal = (r1 == ribi_t::backward(ribi) || r2 == ribi_t::backward(ribi)) && r1 != ribi_t::rotate90l(ribi) && r2 != ribi_t::rotate90(ribi);
+	}
 
 	if(  diagonal  ) {
 		flags |= IS_DIAGONAL;
@@ -687,3 +737,22 @@
 
 	return 0;
 }
+
+void weg_t::display(int xpos, int ypos CLIP_NUM_DEF) const
+{
+	if (is_close_diagonal() && !desc->has_close_diagonal_image()) {
+		image_id image = desc->get_diagonal_image_id(is_close_diagonal() == 1 ? ribi_t::southeast : ribi_t::northeast, is_snow());
+		if (get_owner_nr() != PLAYER_UNOWNED) {
+			if (obj_t::show_owner) {
+				gfx->draw_blend(image, xpos, ypos, get_owner_nr(), gfx->palette_lookup(get_owner()->get_player_color1() + 2) | OUTLINE_FLAG | TRANSPARENT75_FLAG, 0, get_flag(dirty)  CLIP_NUM_PAR);
+			}
+			else {
+				gfx->draw_color(image, xpos, ypos, get_owner_nr(), true, get_flag(dirty)  CLIP_NUM_PAR);
+			}
+		}
+		else {
+			gfx->draw_normal(image, xpos, ypos, 0, true, get_flag(dirty)  CLIP_NUM_PAR);
+		}
+	}
+	obj_t::display(xpos, ypos CLIP_NUM_PAR);
+}
Index: src/simutrans/obj/way/weg.h
===================================================================
--- src/simutrans/obj/way/weg.h	(revision 12019)
+++ src/simutrans/obj/way/weg.h	(working copy)
@@ -58,7 +58,8 @@
 		HAS_WAYOBJ     = 1 << 4,
 		HAS_CROSSING   = 1 << 5,
 		IS_DIAGONAL    = 1 << 6, // marker for diagonal image
-		IS_SNOW        = 1 << 7  // marker, if above snowline currently
+		IS_SNOW        = 1 << 7,  // marker, if above snowline currently
+		IS_CLOSE_DIAGONALS = 3 << 8  // marker for two diagonals on one track, not crsiing, could be either vertical 1 or horizontal 2 (0 for none)
 	};
 
 private:
@@ -90,7 +91,7 @@
 	/**
 	* flags like walkway, electrification, road sings
 	*/
-	uint8 flags;
+	uint16 flags;
 
 	/**
 	* max speed; could not be taken for desc, since other object may modify the speed
@@ -275,6 +276,7 @@
 	inline bool has_wayobj() const {return flags&HAS_WAYOBJ; }
 	inline bool is_crossing() const {return flags&HAS_CROSSING; }
 	inline bool is_diagonal() const {return flags&IS_DIAGONAL; }
+	inline uint8 is_close_diagonal() const { return (flags >> 8) & 03; }
 	inline bool is_snow() const {return flags&IS_SNOW; }
 
 	// this is needed during a change from crossing to tram track
@@ -294,6 +296,8 @@
 
 	FLAGGED_PIXVAL get_outline_colour() const OVERRIDE;
 
+	void display(int xpos, int ypos  CLIP_NUM_DEF) const OVERRIDE;
+
 	/*
 	 * to show single tile
 	 */
