Opened 7 years ago

Last modified 3 years ago

#4636 new defect

Territory Manager should exclude 3 territory tile border

Reported by: elexis Owned by:
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords: simple
Cc: Patch:

Description (last modified by wraitii)

In CCmpRangeManager.cpp we have

// WARNING: CCmpPathfinder::UpdateGrid needs to be kept in sync with this
const ssize_t edgeSize = 3; // number of vertexes around the edge that will be off-world

In CCmpPathfinder.cpp we have

// Compute off-world passability
// WARNING: CCmpRangeManager::LosIsOffWorld needs to be kept in sync with this
const int edgeSize = 3 * Pathfinding::NAVCELLS_PER_TILE; // number of tiles around the edge that will be off-world

This ticket can be solved in two separate patches:

1) The magic number should become a global constant.

2) The number must be taken into account in CCmpTerritoryManager.cpp as well, so that the territory line doesn't disappear in the shroud of darkness.

https://trac.wildfiregames.com/raw-attachment/ticket/4636/hidden_territory_at_map_border.jpg

(This might influence #4267)

Attachments (2)

hidden_territory_at_map_border.jpg (516.5 KB ) - added by elexis 7 years ago.
screenshot0540.jpg (687.5 KB ) - added by elexis 5 years ago.

Download all attachments as: .zip

Change History (11)

by elexis, 7 years ago

comment:1 by elexis, 7 years ago

Description: modified (diff)

comment:2 by elexis, 6 years ago

In 20283:

Fix rmgen2 SimpleObject and RandomObject ignoring the 3 invalid map border tiles.
Let validT take the responsability to account for the actually valid region of map tiles instead of each caller.

Fixes #4814, refs #4636, #4796

comment:3 by Imarok, 5 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

by elexis, 5 years ago

Attachment: screenshot0540.jpg added

comment:4 by elexis, 5 years ago

Keywords: pathfinding removed

As mentioned by wraitii, the constant was introduced in r8882.

The reason for the constant and why it is precisely 3 becomes clear when looking at edgetiles = 0:

https://trac.wildfiregames.com/raw-attachment/ticket/4636/screenshot0540.jpg

comment:5 by elexis, 5 years ago

Phab:D2061 for the const unification.

comment:6 by elexis, 5 years ago

In 22459:

Unify the magic number indicating the number of impassable tiles at the map edge redundant in the Pathfinder, RangeManager and MapGenerator.

Refs #4034, #4636.
Differential Revision: https://code.wildfiregames.com/D2061
Reviewed By: wraitii

comment:7 by wraitii, 3 years ago

Description: modified (diff)

comment:8 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:9 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.