Matei
e2add58410
Added code to requestLowLevelPath that modifies the final waypoint to use exactly the coordinates where the player clicked, instead of the rounded-to-nearest-tile coordinates from the A* pathfinder. A more complete fix required eventually might be to make the A* engine itself aware of fractional locations within a tile but for now this seemed like a simple thing to do. Also fixed a bug that was causing the final step of the path not to be added: the code was adding an ORDER_PATH_END_MARKER but no ORDER_GOTO_NOPATHING for the final point. The ORDER_PATH_END_MARKER doesn't seem to do anything useful here so the unit never went that last step. Also fixed a bug with "pass-through-allies" that was causing units to avoid allies anyway: although the pathfinder assumed you could pass through allies, when you actually bumped into one while executing a goto instruction, the collision test used did not check for pass-through-allies so you ended up avoiding allies anyway. This might not be too horrible if it works in practice (since the avoidance was done using simple local work, not a full repath) but I've removed it for now since it might cause problems with formations, when avoidance will not be trivial. This was SVN commit r4226. |
||
---|---|---|
.. | ||
graphics | ||
gui | ||
i18n | ||
lib | ||
maths | ||
pch | ||
ps | ||
renderer | ||
scripting | ||
simulation | ||
sound | ||
tools | ||
main.cpp |