a truck chooses longer path for building or reparing defence structures #3576
Description
keyword_trucks_paths_structures
resolution_fixed
type_bug
| by anonymous
Example:
Assume that there is a field without any obstacles, with a subfield 4 x 4:
a4 b4 c4 d4
a3 b3 c3 d3
a2 b2 c2 d2
a1 b1 c1 d1
The truck is on the left lower side of defensive structures at a4, b3, c2, d1. Order the truck to build a defensive structure at c3. Sometimes, the truck chooses the shortest path to build the structure at c3 after commming to b2. More often, the truck goes to the upper right side of the map and builds the structure at c3.
There is a similar behaviour when c3 structure is damaged and the truck goes to repair the structure.
This type of behaviour is easier to spot when diagonally placed structures are much longer than in this example.
I expected trucks to choose the shortest path and stay at the same side of diagonal for building or repairing structures that are diagonally accessible.
Does orientation of the truck influence algorithm for choosing path?
Maybe allowing trucks to move backward would result with more the shortest paths and staying on friendly side of the diagonal instead of going to unfriendly side.
Issue migrated from trac:3576 at 2022-04-16 09:55:24 -0700
Activity
wzdev-ci commentedon Sep 15, 2012
Cyp changed status from
new
toclosed
wzdev-ci commentedon Sep 15, 2012
Cyp changed resolution from `` to
fixed
wzdev-ci commentedon Sep 15, 2012
Cyp commented
Pathfind to area around queued structure to be built, instead of to tile under structure.
In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
xy
T *
Fixes #3576.
wzdev-ci commentedon Sep 16, 2012
Cyp commented
Pathfind to area around queued structure to be built, instead of to tile under structure.
In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
xy
T *
Fixes #3576.
wzdev-ci commentedon Sep 16, 2012
Cyp commented
Pathfind to area around queued structure to be built, instead of to tile under structure.
In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
xy
T *
Fixes #3576.