[Freeciv-Dev] [bug #22053] Impossible to attack cities with pathfinding

2014-05-20 Thread Emmet Hikory
Follow-up Comment #3, bug #22053 (project freeciv):

Ah, right, and the target city might be fogged when the path is created. 
Apologies for the confusion: the original patch is correct.  On reflection, I
entirely failed to consider fogging for patch #3901: we may discover other
oddities as a result of paths created from incomplete knowledge.

___

Reply to this item at:

  http://gna.org/bugs/?22053

___
  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 #22053] Impossible to attack cities with pathfinding

2014-05-20 Thread pepeto
Update of bug #22053 (project freeciv):

  Status:   Need Info = Ready For Test 

___

Follow-up Comment #4:

Actually fogged tiles cannot be well handled, because they could be units on
the paths, or maybe terrain changes etc. But I think how it works in current
version of Freeciv is acceptable.


___

Reply to this item at:

  http://gna.org/bugs/?22053

___
  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 #22053] Impossible to attack cities with pathfinding

2014-05-19 Thread Emmet Hikory
Follow-up Comment #1, bug #22053 (project freeciv):

Only units with UCF_CAN_OCCUPY should be permitted to attack cities that do
not contain units, so conditional becomes something like the following
(untested):


  if ((is_non_allied_unit_tile(target, param-owner)
   || (is_non_allied_city_tile(target, param-owner)
 uclass_has_flag(param-uclass, UCF_CAN_OCCUPY)))
   ((uclass_has_flag(param-uclass, UCF_ATTACK_NON_NATIVE)
!BV_ISSET(param-unit_flags, UTYF_ONLY_NATIVE_ATTACK))
  || is_native_tile_to_class(param-uclass, target))



___

Reply to this item at:

  http://gna.org/bugs/?22053

___
  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 #22053] Impossible to attack cities with pathfinding

2014-05-18 Thread pepeto
URL:
  http://gna.org/bugs/?22053

 Summary: Impossible to attack cities with pathfinding
 Project: Freeciv
Submitted by: pepeto
Submitted on: Sun 18 May 2014 11:06:40 PM CEST
Category: ai
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: pepeto
Originator Email: 
 Open/Closed: Open
 Release: trunk r24881
 Discussion Lock: Any
Operating System: Any
 Planned Release: 2.6.0

___

Details:

First bug detected in patch #3901. Fix attached.




___

File Attachments:


---
Date: Sun 18 May 2014 11:06:40 PM CEST  Name: pf_able_to_attack.patch  Size:
744B   By: pepeto

http://gna.org/bugs/download.php?file_id=20759

___

Reply to this item at:

  http://gna.org/bugs/?22053

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


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