Opened 6 years ago

Closed 6 years ago

#4937 closed defect (fixed)

Unreachable trees on random map Oasis

Reported by: Imarok Owned by: elexis
Priority: Must Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description (last modified by Imarok)

Almost every time there are unreachable trees in the water. Here is an example with Phab:rP20803 seed 1085716770 and map size normal: https://i.imgur.com/5do1kCF.png

(the trees outside the colored region are unreachable)

Attachments (1)

screenshot0136.png (613.3 KB ) - added by Imarok 6 years ago.
Unreachable trees on Oasis

Download all attachments as: .zip

Change History (4)

by Imarok, 6 years ago

Attachment: screenshot0136.png added

Unreachable trees on Oasis

comment:1 by Imarok, 6 years ago

Description: modified (diff)

comment:2 by elexis, 6 years ago

Cc: elexis removed
Component: UI & SimulationMaps

Thanks for the hierarchical pathfinder trick, I wasn't aware.

This stupid bug cost me hours. The crux is that both water and forest are created in the same statement and that it is probably a feature that half of the trees are submerged in water.

Just splitting water and forest generation would work well no matter what numbers are chosen. But it looks nice to have some trees submerged, so I'll keep the weird algorithm, move the magic numbers to constants and fine-tune them to avoid the issue.

This will make placing a dock more feasible too and not an exception.

Thanks for the report!

comment:3 by elexis, 6 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 20858:

Fix unreachable trees on Oasis, fixes #4937.

Use constants instead of convoluting magic numbers
Use vector algebra and distributePointsOnCircle to determine the locations of animals in the oasis, refs #4845.

Note: See TracTickets for help on using tickets.