Opened 13 years ago
Closed 13 years ago
#893 closed defect (fixed)
Unit spawning should respect passability class
Reported by: | historic_bruno | Owned by: | historic_bruno |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 7 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Unit spawning is broken because it only considers unit obstructions, meaning both trained and ungarrisoned units can be spawned on terrain that violates their passability class. This is one of the causes of "land ships", #771 and #818. I'm working on a fix for #804 which should also fix this (using the PassabilityClass defined in pathfinder.xml).
A few considerations:
- The current behavior is bad, when spawning fails it just places the unit in the middle of the building which in the case of docks can expose a subtlety of the pathfinder: units on impassable border tiles (as between land and water) can move to other impassable tiles but not actually cross the boundary - meaning they get stuck as land ships if they move onto land.
Expand the search outward when spawning units, boats are large and docks have limited space to spawn units.- If a unit fails to spawn after training, it could be left blocking the training queue until it finds space or is cancelled. This will require some changes to the queue design and notification of the user.
If a unit fails to ungarrison, it could be left garrisoned unless the ejection is forced (e.g. a unit changes ownership while garrisoned)
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Description: | modified (diff) |
---|
comment:3 by , 13 years ago
comment:4 by , 13 years ago
Description: | modified (diff) |
---|
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [9970]) Implements building restrictions (by terrain, territory, category, and distance). See #41. Fixes #804, #287. Implements build limits. See #687. Implements autorotation for dock placement. Fixes unit spawning to consider terrain passability. See #893. Adds new passability criteria based on distance from shore. Updates build restrictions on some templates. Changes unit spawning search to 4 tiles away from foundation. Changes garrison/training spawn failure to nicer UI notification.