Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8557) auto-launched games should have topology to
Home

[Freeciv-Dev] Re: (PR#8557) auto-launched games should have topology to

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8557) auto-launched games should have topology to match view
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Apr 2004 13:16:48 -0700
Reply-to: rt@xxxxxxxxxxx

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

Mike Kaufman wrote:

> As for the patch, you need not declare the extra buffer, buf[512] is
> certainly sufficient, also, you should add an extensive comment as to why
> you're putting this there.

Here's a new patch.

jason

? cma_weirdness
? data/civ3
? data/womoks
Index: client/connectdlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/connectdlg_common.c,v
retrieving revision 1.5
diff -u -r1.5 connectdlg_common.c
--- client/connectdlg_common.c  16 Apr 2004 17:30:27 -0000      1.5
+++ client/connectdlg_common.c  20 Apr 2004 20:15:15 -0000
@@ -55,6 +55,7 @@
 #include "chatline_common.h"
 #include "connectdlg_g.h"
 #include "connectdlg_common.h"
+#include "tilespec.h"
 
 #define WAIT_BETWEEN_TRIES 100000 /* usecs */ 
 #define NUMBER_OF_TRIES 500
@@ -260,6 +261,21 @@
                            "start one manually. Sorry..."));
     return FALSE;
   }
+
+  /* We set the topology to match the view.
+   *
+   * When a typical player launches a game, he wants the map orientation to
+   * match the tileset orientation.  So if you use an isometric tileset you
+   * get an iso-map and for a classic tileset you get a classic map.  In
+   * both cases the map wraps in the X direction by default.
+   *
+   * Setting the option here is a bit of a hack, but so long as the client
+   * has sufficient permissions to do so (it doesn't have HACK access yet) it
+   * is safe enough.  Note that if you load a savegame the topology will be
+   * set but then overwritten during the load. */
+  my_snprintf(buf, sizeof(buf), "/set topology %d",
+             TF_WRAPX | (is_isometric ? TF_ISO : 0));
+  send_chat(buf);
 
   return TRUE;
 #else /* Can't do much without fork(). */

[Prev in Thread] Current Thread [Next in Thread]