Re: [Freeciv-Dev] (PR#39126) Nuke bug

2007-05-12 Thread Pepeto _

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >




>From: "Per Inge Mathisen" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: (PR#39126) Nuke bug
>Date: Sat, 12 May 2007 04:47:37 -0700
>
>
>http://bugs.freeciv.org/Ticket/Display.html?id=39126 >
>
>On 5/12/07, Per Inge Mathisen <[EMAIL PROTECTED]> wrote:
> > I do not think the "Explore Nuke" command is not meant to be a goto
> > command. You can use the normal goto command for nukes. The cursor
> > that appears on "Explore Nuke" is a cosmetic bug. It should just nuke
> > at once when this command is given. In 2.1 and up there might be a
> > problem using goto properly for nukes, though.
>
>On a second thought, it seems clear that someone thought it should be
>implemented this way, and I do not know how long it has been
>implemented that way before it was broken. So I committed the patch,
>and made the attached patch for 2.1.
>
>   - Per
>


><< nuke2.diff >>


Thx

_
Personnalisez votre Messenger avec Live.com 
http://www.windowslive.fr/livecom/



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39126) Nuke bug

2007-05-12 Thread Per Inge Mathisen

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >

On 5/12/07, Per Inge Mathisen <[EMAIL PROTECTED]> wrote:
> I do not think the "Explore Nuke" command is not meant to be a goto
> command. You can use the normal goto command for nukes. The cursor
> that appears on "Explore Nuke" is a cosmetic bug. It should just nuke
> at once when this command is given. In 2.1 and up there might be a
> problem using goto properly for nukes, though.

On a second thought, it seems clear that someone thought it should be
implemented this way, and I do not know how long it has been
implemented that way before it was broken. So I committed the patch,
and made the attached patch for 2.1.

  - Per

Index: client/control.c
===
--- client/control.c	(revision 12931)
+++ client/control.c	(working copy)
@@ -1352,6 +1352,7 @@
   if (can) {
 set_hover_state(punits, HOVER_NUKE, ACTIVITY_LAST, ORDER_LAST);
 update_unit_info_label(punits);
+enter_goto_state(punits);
   } else {
 create_event(offender, E_BAD_COMMAND,
 		 _("Only nuclear units can do this."));
@@ -1834,7 +1835,7 @@
   if (!possible) {
 	create_event(offender, E_BAD_COMMAND, _("Too far for this unit."));
   } else {
-	do_unit_goto(ptile);
+do_unit_goto(ptile);
 	if (!pcity) {
 	  unit_list_iterate(punits, punit) {
 	/* note that this will be executed by the server after the goto */
@@ -1855,6 +1856,7 @@
   do_unit_patrol_to(ptile);
   break;	
 }
+
 set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST);
 update_unit_info_label(get_units_in_focus());
   }
@@ -2035,7 +2037,7 @@
 {
   struct tile *dest_tile;
 
-  if (hover_state != HOVER_GOTO) {
+  if (hover_state != HOVER_GOTO && hover_state != HOVER_NUKE) {
 return;
   }
 
@@ -2047,8 +2049,6 @@
 create_event(ptile, E_BAD_COMMAND,
 		 _("Didn't find a route to the destination!"));
   }
-
-  set_hover_state(NULL, HOVER_NONE, ACTIVITY_LAST, ORDER_LAST);
 }
 
 /**
Index: client/goto.c
===
--- client/goto.c	(revision 12931)
+++ client/goto.c	(working copy)
@@ -752,6 +752,8 @@
 	connect_initial++;
   }
 } /* otherwise moves_left_initially = punit->moves_left (default) */
+  } else if (hover_state == HOVER_NUKE) {
+parameter->is_pos_dangerous = NULL; /* nuclear safety? pwah! */
   }
 
   if (is_attack_unit(punit) || is_diplomat_unit(punit)) {
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39126) Nuke bug

2007-05-12 Thread Per Inge Mathisen

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >

I do not think the "Explore Nuke" command is not meant to be a goto
command. You can use the normal goto command for nukes. The cursor
that appears on "Explore Nuke" is a cosmetic bug. It should just nuke
at once when this command is given. In 2.1 and up there might be a
problem using goto properly for nukes, though.

  - Per



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39126) Nuke bug

2007-05-11 Thread Pepeto _

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >



>From: "Per I. Mathisen" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: (PR#39126) Nuke bug Date: Fri, 11 May 2007 13:33:12 -0700
>
>
>http://bugs.freeciv.org/Ticket/Display.html?id=39126 >
>
>So the nuke cursor is meant to work as a goto? Do you have a savegame to
>show the problem for 2.0?
>
>I do not understand the "nuke all your cities in a click" comment for 2.1.

Just, the nuke explode at their position without move.
I did a save game for you.

_
Windows Live Spaces : créez votre blog à votre image ! 
http://www.windowslive.fr/spaces



nukebug.sav.gz
Description: GNU Zip compressed data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39126) Nuke bug

2007-05-11 Thread Per I. Mathisen

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >

So the nuke cursor is meant to work as a goto? Do you have a savegame to
show the problem for 2.0?

I do not understand the "nuke all your cities in a click" comment for 2.1.

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39126) Nuke bug

2007-05-08 Thread Guest

http://bugs.freeciv.org/Ticket/Display.html?id=39126 >

Apply the patch in reverse mode (i did a mistake with source and
destination with diff): patch -Rp1

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev