Skip to main content
Topic: ****ertion failed with map enlargement (Read 2954 times) previous topic - next topic

****ertion failed with map enlargement

For map number 8751, size 16x192, water level -2, mountain height 320, map roughness 7, I get an ****ertion failed when enlarging to 40x192 (no rotation).

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

Code: [Select]
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:
Parsley, sage, rosemary, and maggikraut.

Re: ****ertion failed with map enlargement

Reply #1
The cleanup is nessesary, as omitting it may produce broken slopes. I will did into it.

 

Re: ****ertion failed with map enlargement

Reply #2
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.

Re: ****ertion failed with map enlargement

Reply #3
for me this was fixed, by moving the cleanup-call some lines up.
Parsley, sage, rosemary, and maggikraut.