Lumberjack ignores player's vision range
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
Lumberjacks are currently able to go into dark areas beyond the player's vision range and find trees to chop down. This might also affect other workers, though I have only been able to find a reproducible scenario with lumberjacks.
1. Start a new game (map:Atoll, player:1)
2. Build a Lumberjack's hut in the southwest.
3. Speed up the game.
4. At first the lumberjack will cut down trees within the vision range.
5. Sometimes he moves to the edge, which reveals new parts of the map (along with new trees). (This seems fair to me)
6. When the visible trees are exhausted, he moves into the dark, somehow knowing a tree can be found there. (This seems a bit strange)
Expected result:
A worker should not be able to see beyond the player's vision range. Thus, the lumberjack should wait until the an area is revealed before being able to cut down the trees there.
Though I do not know the source code, could it be possible to reduce a building's workarea to what is within a player's vision range, and exclude the dark parts of the map. This would then be updated as the player expands the vision range.
Related branches
- Nicolai Hähnle: Approve
- SirVer: Approve
-
Diff: 18 lines (+9/-0)1 file modifiedsrc/logic/worker.cc (+9/-0)
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
assignee: | Jens Beyer (Qcumber-some) (qcumber-some) → nobody |
In my opinion, the lumberjack logic in this regard should behave like the hunter or soldier (or scout for that matter). Where any worker travels on the map should provide the player at least a temporary view of that area. Upon leaving an area that would normally be out of the player's vision, the area should either be grayed to show only topography (i.e. no bob animation) or returned to the blackened shade.