[Freeciv-Dev] [bug #22319] Experimental ruleset Triremes can't move up rivers on trunk

2014-07-14 Thread Emmet Hikory
Update of bug #22319 (project freeciv):

  Status:  Ready For Test => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #22319] Experimental ruleset Triremes can't move up rivers on trunk

2014-07-12 Thread Emmet Hikory
Update of bug #22319 (project freeciv):

Category:None => general
  Status:None => Ready For Test 
 Assigned to:None => persia 

___

Follow-up Comment #2:

Patch attached.  Actually split test into two parts for speed: when moving
from a native terrain, there's no point iterating over extras (and it's safe
to return "FALSE" if the destination isn't native at all).  Destination
nativity could be wrapped in a cache boolean, but when I did it that way, it
looked ugly, so we'll risk needing to call it multiple times when attempting
to move to non-native destinations from a source that contains multiple
non-road native extras (which is probably a rare case anyway).


(file #21392)
___

Additional Item Attachment:

File name: allow-moves-to-native-roads-from-native-terrains.patch Size:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #22319] Experimental ruleset Triremes can't move up rivers on trunk

2014-07-12 Thread Emmet Hikory
Follow-up Comment #1, bug #22319 (project freeciv):

Oh, interesting.  It seems that is_native_move() isn't prepared to handle the
case of moving from a native tile (for non-road reasons) to a destination tile
that is native because of a road which is not an acceptable connecting road. 
Neither bug #16383 nor bug #22026 managed to consider this particular
situation.

Other ways to demonstrate the issue involve having a BuildAnywhere unit that
needs roads move to a roaded tile from a city without a road, moving from a
native base (with no road) to a roaded tile, etc.

Fix is to check whether the source is native for non-road (but possibly extra)
reasons as an additional else clause before entering the extras iteration: if
the source is native, check if the destination is native for any reason
(including roads: a simple is_native_to_class(punitclass, dst_tile) will do),
and if so, return TRUE.

I'm not up to writing a patch for that today, but will do so in the next
couple days if someone else doesn't get to it first.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #22319] Experimental ruleset Triremes can't move up rivers on trunk

2014-07-12 Thread Jacob Nevins
Additional Item Attachment, bug #22319 (project freeciv):

File name: exp-trireme-25.sav.bz2 Size:14 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #22319] Experimental ruleset Triremes can't move up rivers on trunk

2014-07-12 Thread Jacob Nevins
URL:
  

 Summary: Experimental ruleset Triremes can't move up rivers
on trunk
 Project: Freeciv
Submitted by: jtn
Submitted on: Sat 12 Jul 2014 16:24:03 BST
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk r25504
 Discussion Lock: Any
Operating System: GNU/Linux
 Planned Release: 2.6.0

___

Details:

See attached 2.5 savegame (where this works fine).

Client seems to mostly think that triremes can move on rivers (Ctrl-Shift-N
shows tiles as native, and it lets me try to make the move), but if I try to
move with the arrow keys I get "Trireme cannot move here without a native path
for Trireme"

Client-side goto path drawing does think river tiles are verboton, though
(shows me a red circle-with-cross rather than a blue goto line, if I click
says "Didn't find a route to the destination!"




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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