Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10569) center_on_something fails
Home

[Freeciv-Dev] (PR#10569) center_on_something fails

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10569) center_on_something fails
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Oct 2004 17:38:20 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10569 >

If there is not a single known tile on the map then center_on_something 
will abort.  Mike had a savegame from civworld that did this.  Obviously 
this should never happen, but it's easy to fix.

jason

Index: client/climisc.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/climisc.c,v
retrieving revision 1.141
diff -u -r1.141 climisc.c
--- client/climisc.c    29 Sep 2004 02:24:19 -0000      1.141
+++ client/climisc.c    17 Oct 2004 00:34:35 -0000
@@ -384,7 +384,7 @@
       }
     } iterate_outward_end;
 
-    assert(0);
+    center_tile_mapcanvas(native_pos_to_tile(map.xsize / 2, map.ysize / 2));
   }
 }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10569) center_on_something fails, Jason Short <=