These parts were identical duplicates, so I removed them
and made AudReader depend on ImaAdpcmReader instead.
Applied some style fixes while I was at it.
Reducing the count of proprietary formats in Mods.Common.
Note: Moving ShpD2 to Mods.Cnc is intentional. RA/TD
use it for their original mouse shp files, and any D2(k) mod
will normally need Mods.Cnc anyway, while we can avoid
adding a Mods.D2k dependency to RA/TD this way.
While this is strictly speaking a D2 format, any
D2 mod is pretty much guaranteed to use Mods.D2k,
so this should be a good enough place to move it to.
By default WithDamageOverlay uses the actors'
palette, but RA's desert terrain uses the TD desert.pal
which isn't compatible with RA's fire animation shps.
Removes the 'activeMCVs' list since it was not useful.
The real bugfix is not iterating over 'activeMCVs' when issueing new orders
(this was previously needed for already discovered mcvs that stopped)
but over 'newMCVs' instead.
Replace Constants.CellCost and Constants.DiagonalCellCost with a dynamically calculated value based on the lowest cost terrain to traverse. Using a fixed value meant the pathfinder heuristics would be incorrect.
In the four default mods, the minimum cost is in fact 100, not 125. This increase would essentially allow the pathfinder to return suboptimal paths up to 25% longer in the worst case, but it would be quicker to do so.
This is exactly what Weighted A* does - overestimate the heuristic by some factor in order to speed up the search by checking fewer routes. This makes the heuristic inadmissible and it may now return suboptimal paths, but their worst case length is bounded by the weight. A weight of 125% will never produce paths more than 25% longer than the shortest, optimal, path.
We set the default weight to 25% to effectively maintain the existing, suboptimal, behaviour due to the choice of the old constant - in future it may prove a useful tuning knob for performance.