Follow-up Comment #22, bug #16383 (project freeciv): While working on patch #3886, I realised this also needs adjustments for pathfinding, so that AI Triremes don't consider the river-path through the continent the best possible route only to become confused when unable to actually make a given move. While updating this patch to address that (by adding much of the same logic into tile_move_cost_ptrs()), I understood why there are two calls to tile_virtual_destroy(): my apologies for the extraneous question.
Attached is a (somewhat ugly) patch including minor adjustments to CardinalRiverMoveRestrictions-2.patch to better support pathfinding as well as the string change suggested in my last comment. Given the duplication of logic, it might be nice to define can_class_exist_at_tile() (to be used by can_exist_at_tile()), and possibly wrap the vtile create/clear roads/test nativity/destroy logic in another helper function: neither is addressed in my patch for clearer comparison to the prior version (although git notations seem not to have helped here). (file #17854) _______________________________________________________ Additional Item Attachment: File name: CardinalRiverMoveRestrictions-2+persia.patch Size:7 KB _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?16383> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev