URL: <http://gna.org/patch/?3725>
Summary: Optimize disabled autoattack case Project: Freeciv Submitted by: cazfi Submitted on: Wed 20 Feb 2013 12:43:42 PM EET Category: general Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.0 _______________________________________________________ Details: Check against disabled autoattack (default!) is made only in deep in the iteration of autoattackers. Each unit is not selected to the list of autoattackers when autoattack is disabled, leaving the constructed list empty. All the autoattack stuff is executed even when autoattack is disabled, empty list just makes sure no unit actually attacks. Attached patch moves check for autoattack setting out of the loop, and no autoattack code is executed when it's disabled. Targeting to TRUNK only just to be extra safe - there's always a chance I missed some side-effect that should happen even when autoattack disabled. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 20 Feb 2013 12:43:42 PM EET Name: DisabledAutoattackOptimization.patch Size: 1kB By: cazfi <http://gna.org/patch/download.php?file_id=17277> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?3725> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev