The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Dwachs on October 07, 2009, 07:04:10 PM

Title: assertion failed with map enlargement
Post by: Dwachs on October 07, 2009, 07:04:10 PM
For map number 8751, size 16x192, water level -2, mountain height 320, map roughness 7, I get an assertion failed when enlarging to 40x192 (no rotation).

This small patch cures this, but I am not sure whether it breaks other things:

Index: simworld.cc
===================================================================
--- simworld.cc (revision 2713)
+++ simworld.cc (working copy)
@@ -1363,6 +1363,8 @@
}
}

+ cleanup_karte( old_x, old_y );
+
// smoothing the seam (if possible)
for (sint16 x=1; x<old_x; x++) {
koord k(x,old_y);
@@ -1399,8 +1401,6 @@
}
}

- cleanup_karte( old_x, old_y );
-
// eventuall update origin
switch( einstellungen->get_rotation() ) {
case 1:
Title: Re: assertion failed with map enlargement
Post by: prissi on October 08, 2009, 01:28:48 PM
The cleanup is nessesary, as omitting it may produce broken slopes. I will did into it.
Title: Re: assertion failed with map enlargement
Post by: prissi on November 11, 2009, 09:33:29 PM
Well, there are in the first rund illegal hieght differences. (simworld.cc line 1747) However it seems in further round those go away. And it happens only because near the border during enlargement is a very height mountain. It is an error, but I have no easy idea how to fix it without slowing down normal operation considerable.
Title: Re: assertion failed with map enlargement
Post by: Dwachs on November 14, 2009, 08:38:20 AM
for me this was fixed, by moving the cleanup-call some lines up.
Title: Re: assertion failed with map enlargement
Post by: Dwachs on March 10, 2011, 08:40:53 AM
fixed in r4352/