Make sure we do not treat as circles entities that we really should
treat as squares (such as trees). This fixes an issue reported by Stan.
Make sure we never forget about our destination if we are blocked by
unit obstructions. This makes sure that units in a group but not in
formation will not be blocked by the other units, and probably makes the
general behavior more sane. Helps following [17166]
Refs #3505, #3471, #3376
This was SVN commit r17191.
Also fix a potential issue I noticed in some cases, though that
particular fix implies scrapping waypoints, so if units seem to get
lost, please report so and I'll revert those changes.
I can't find any way to get units stuck with this patch.
This was SVN commit r17163.
Change the way the long-range pathfinder rasterisation works slightly so
that we have a better compatibility with the short-range pathfinder.
Should fix the "stuck units" issues, though I am not sure so I am not
marking them as fixed so far. Refs #3471, #3505, and possibly #3292.
Caveat: I am now using clearance of 0.8 for "default" class, which might
have side-effects: please report anything weird.
Also fix leftover style issues.
This was SVN commit r17161.
This resulted in ALL "units inside obstructions" issues.
Thanks to elexis for the testing.
Fixes#3532, #3450.
Refs #3538 (still OOSes), #3410 (unitmotion remains buggy for
formations, but this is only aesthethic.)
Probably affects #3471 and #3505, but those are not fixed.
This was SVN commit r17152.
Please note that this commit makes #3410 really visible. Formation
members might pass through buildings.
Refs #3410, #3337.
This was SVN commit r17028.
This typo didn't have any influence since dirty unit shapes are usually
discarded during the rasterization (they don't block long-range
pathfinding). Switching the order of a check in RasterizeHelper prevents
performance problems to a really small extent.
This was SVN commit r17014.
Now that units flee it's necessary to fix the unit chasing: this commit
reintroduces some code from 298115f4c5 that disappeared with the
committing of the new pathfinder. Refs #1537.
Also includes some style improvements to the UnitMotion code.
This was SVN commit r17013.
With this change, units will not check their movement against all
obstructions when moving: terrain and static obstructions are assumed to
be handled by the long-range pathfinder.
However, when static obstructions are changed, the paths have to be
invalidated. In order to minimize the performance impact, units will
check for obstructions when they move after a passability change. If
they collide with something, they will recompute a path that will take
into account the new passability map.
Also includes some code cleanup. This patch should not change
performance a lot: the lower number of checks should give a small
performance improvement while using the message broadcasting system
should hurt it a bit.
Fixes#3376, #3337, #1914.
This was SVN commit r16998.
Those shapes need to be taken into account when computing a short path,
but they need to be discarded when checking movements or they will
create long/short inconsistencies.
This was SVN commit r16981.
As a general rule, pathfinding-blocking shapes should not be tested
against for movements. Only the passability grid should be considered.
As the algorithm which tests paths on this grid was fixed in 1c9ea56800,
it can be safely used.
Fixes#3376.
This was SVN commit r16971.
The list of modified entities was thrown out on global visibility
updates (those happen on rejoin) but only in-world entities were
actually updated then, causing problems with garrisoning.
Now the list of modified entities can happen to be large, so replace the
hacky check for infinite loops by a real check.
This was SVN commit r16962.
However, using the terrain-only grid reveals one discrepancy between the
short pathfinder (which uses unit radii) and the long one (which uses
unit clearances). So I implemented the change proposed by sanderd17 in
#3294, which is removing unit radius and using only the pathfinder
clearance. Refs #3294
Now some tweaking has to be done in the templates, so that units get a
passability class suited to their apparent size. In the meantime the
unit motion is quite bugged.
This was SVN commit r16867.