Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4012 closed defect (fixed)

[PATCH] Phoenician levant has unreachable trees — at Version 13

Reported by: sanderd17 Owned by: FeXoR
Priority: Should Have Milestone: Alpha 21
Component: Maps Keywords: patch
Cc: FeXoR Patch:

Description (last modified by elexis)

Pheonician levant (or was it Phoenician) has a lot of unreachable trees on the map boundary.

It's easy to find them via the obstruction overlay.

This is because on square maps, there's a border of 3 tiles wide that's unpassable and allows the terrain to fade to black.

The following patch should fix it (apparently map size is expressed in tiles instead of meters?).

Change History (20)

by sanderd17, 8 years ago

Attachment: Phönicia.diff added

by sanderd17, 8 years ago

Attachment: Phönicia.2.diff added

First patch messes up mountains on the edge, second patch doesn't

comment:1 by FeXoR, 8 years ago

I guess adding a constant mapBorderShadowWidth, making it the default parameter for the distance parameter in Map.validT and use that for both, round and rectangular maps would be better. That also will require thorough testing especially on round maps of different sizes and the edges of rectangular maps to ensure we didn't overlook some behavoir of the engine we didn't expect.

by FeXoR, 8 years ago

Just uses the distance parameter instead of a hardcoded 3

comment:2 by FeXoR, 8 years ago

That last patch fixes an issue not taking into account the distanceparameter on rectangular maps. AFAIK that fixes the issue. Thanks sanderd17 for notifying me about this issue, the ticket and the patch.

comment:3 by FeXoR, 8 years ago

Owner: set to FeXoR
Resolution: fixed
Status: newclosed

In 18312:

Fixes a bug for random maps where Map.validT didn't apply the distance parameter properly on rectangular maps. Fixes #4012

comment:4 by FeXoR, 8 years ago

Keywords: review removed

comment:5 by sanderd17, 8 years ago

Resolution: fixed
Status: closedreopened

Apparently the patch is broken, the majority of resources don't appear on the map after this patch. Only a few bushes appear on the map.

comment:6 by FeXoR, 8 years ago

Component: UI & SimulationMaps

by FeXoR, 8 years ago

Attachment: map.js2016-6-11.patch added

Fixes the unhandled case if distance is not given

comment:7 by FeXoR, 8 years ago

Summary: [PATCH] Pheonician levant has unreachable trees[PATCH] Phoenician levant has unreachable trees

by FeXoR, 8 years ago

Attachment: map.js2016-6-11rename.patch added

ALTERNATIVE patch also renaming (mv) phoenician_levant.js/json to fix the typo

comment:8 by FeXoR, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 18360:

Fixes a bug introduced in r18312 that prevents entity placement on some rectangular maps e.g. Phoenician Levant and Corsica vs Sardinia. Also fixes a typo in the Phoenician Levant .js and .json files. Fixes #4012

by fatherbushido, 8 years ago

It looks like i have still the same bug but at bottom of the map now

comment:9 by fatherbushido, 8 years ago

Resolution: fixed
Status: closedreopened

comment:10 by sanderd17, 8 years ago

@fatherbushido: it's not exactly the same bug. In the old bug, the trees never became visible as they were beyond the SoD edge.

It looks that in your case, the trees are placed exactly on the map boundary, creating little space for the units to gather the trees, and causing the units to block each other from movements.

It should be perfectly possible to gather the tree with a single unit in your case, so I'm not convinced this issue should be solved in the map. It should rather be solved in the UnitAI, UnitMotion and/or pathfinder.

by FeXoR, 8 years ago

Attachment: placer_fix2016-6-28.diff added

Fixes SimpleObject.place() placing entities outside playable map and add const MAP_BORDER_WIDTH

comment:11 by FeXoR, 8 years ago

Resolution: fixed
Status: reopenedclosed

comment:12 by FeXoR, 8 years ago

Fixed in changeset r18450

comment:13 by elexis, 7 years ago

Description: modified (diff)

refs r20283, #4814

Note: See TracTickets for help on using tickets.