URL:
  <http://gna.org/patch/?1186>

                 Summary: Improve find_vacant_tile efficiency
                 Project: Battle for Wesnoth
            Submitted by: msflowers
            Submitted on: Wednesday 07/08/2009 at 00:38
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

* Old version failed to check passability of target hex for unit
* Old find_vacant_tile used following search pattern where number represents
the number of tiles away from target to look for a valid hex:
0,0,1,0,1,2,0,1,2,3,0,etc.
* Proposed patch uses search pattern: 0,1,2,3,4,etc.
* Proposed patch performs check on next,current and immediate previous hex
group rather than next, current and all previous hexes checked
* Proposed patch eliminates mild overhead by removing sub-function

A patch that nobody will notice, just wait though...someone's gonna make a
map with a million undead and you have to teleport somewhere into the middle
of all of them. Then you'll be thanking me. :P



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wednesday 07/08/2009 at 00:38  Name: find_vacant_tile.patch  Size: 3kB 
 By: msflowers

<http://gna.org/patch/download.php?file_id=6160>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1186>

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


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to