#143: searching for nearest vtol landing sites: true distance instead of
manhattan distance
-------------------------------------+--------------------------------------
        Reporter:  mfreire           |        Type:  defect                     
          Status:  new               |    Priority:  minor                      
       Milestone:                    |   Component:  Engine: Resource Management
         Version:  svn/trunk         |    Keywords:  vtol rearm, tile search    
Operating_system:  All/Non-Specific  |   Blockedby:                             
        Blocking:                    |  
-------------------------------------+--------------------------------------
 When VTOLs search for a refueling point to land in, they look for it using
 Manhattan distance: all nearby tiles at max(dx,dy) = 1, then
 max(dx,mdy)=2, up to max(dx,dy)=20. In the worst case, a VTOL at 100,100
 that needs to refuel will select a tile at 119,119 (true distance 26.8)
 over one at 120,100 (true distance of 20, 34% less).

 As suggested by replies to
 http://forums.wz2100.net/viewtopic.php?f=6&t=2352, I am attaching a patch
 that will choose the nearest eligible tile. I have tested it stand-alone
 and against r6299. I'm attaching the stand-alone test program and the
 diffs.

-- 
Ticket URL: <http://developer.wz2100.net/ticket/143>
Warzone 2100 Trac <http://wz2100.net/>
The Warzone 2100 Resurrection Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to