mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-24 09:08:08 +00:00
44aef27b78
D981/c219ee54b2 changed IsInXChecks to use edge-to-edge distance instead of centre-to-edge, which broke UnitMotion's min-range movement, which assumed distance to the center. Since units are represented as squares, the diagonal point may be closer to the target than the "real" clearance by a factor √2, so the delta between minimum range and maximum range should be at least `(√2 - 1) * clearance` to be safe in all situations (this is generally not a problem for regular units which have a clearance of 0.8, but could be one for catapults or elephants). Differential Revision: https://code.wildfiregames.com/D1969 This was SVN commit r22422.