#3447 closed defect (fixed)
Sometimes units are stuck in a loop trying to pass left and right of each other
Reported by: | ffm | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 25 |
Component: | Core engine | Keywords: | Pathfinding |
Cc: | Patch: |
Description (last modified by )
Sometimes a unit tries to pass another unit but cant because the units stuck in a loop trying to pass left and right of each other.
In Carrier Sense Multiple Access the collision problem is solved by waiting a random backoff period. https://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection
if last_redirection_of_this_Unit < Time_1_second unit_hold(randomTime_between_0_and_0.5_seconds) endif
The Bug would happen less frequently if the unit carrying the resource has a higher priority has a higher priority than the unit on the way to gather resources, so lower prioritized unit makes way for the other one, as proposed in Ticket #3442.
Attachments (4)
Change History (13)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Exist at last since Alpha 7 is very older bug.( ignored for very long time)
comment:3 by , 9 years ago
Description: | modified (diff) |
---|
by , 9 years ago
Attachment: | commands_brit_merchantships.txt added |
---|
British merchant ships blocking each other on r17108. Exactly that bug.
by , 9 years ago
Getting humans stuck is rather rare as they have a small radius.
comment:4 by , 9 years ago
Description: | modified (diff) |
---|
comment:5 by , 9 years ago
Might be easier to fix by implementing #3442. If two colliding units have the same priority, roll the dice who may pass.
follow-up: 7 comment:6 by , 8 years ago
Bumping for A20 given the pathfinder fixes: does this still happen? I guess nothing is actually preventing it.
comment:7 by , 8 years ago
Milestone: | Backlog → Alpha 20 |
---|
Replying to wraitii:
Bumping for A20 given the pathfinder fixes: does this still happen?
Since the replay is only 40 commits old, I'm pretty sure this still happens. The bug has also persistently survived all pathfinder changes since ages.
comment:9 by , 3 years ago
Description: | modified (diff) |
---|---|
Milestone: | Backlog → Alpha 25 |
Resolution: | → fixed |
Status: | new → closed |
This won't happen anymore since the current UnitMotion system will let moving units pass through eachother.
This bug exists at least since alpha 17, so it's not caused by the new pathfinder.
I distinctly remember merchantships having that problem on the random map script Latium. Two of them were sufficient to loop indefinitely.