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.
Currently only preview entities are affected, and they are not
serialized, but it could break a lot of things in the future.
This was SVN commit r16858.
The game has to deal with situations such as: the visibility of an
entity changes, a mirage is created for it -> the mirage visibility is
updated -> the entity visibility is updated back.
All of this process now happens in the same turn, and all updates are
guaranteed to be performed. This fixes a source of serialization errors
and rejoin OOSes.
Fixes#3107
This was SVN commit r16857.
Also make the GetPassabilityClasses functions use references instead of
wild allocations. Use a reference when passing pass classes to the AI
worker.
This was SVN commit r16833.