You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Units::teleport does not correctly handle Wagons #5797
The gui/teleport script uses the Units::teleport(df::unit *, df::coord) function to move units, and it appears to be capable of teleporting caravan wagons. However, it does not have the necessary logic to adjust occupancy flags for EQUIPMENT creatures, which means it will leave the map's occupancy flags in an inconsistent state afterwards.
DF's own functions unitst::do_largeocc() and unitst::undo_largeocc() are responsible for handling this.
Confirmed. Units::teleport only updates the unit/unit_grounded occupancy bits on the single center tile, so EQUIPMENT-sized units like wagons leave stale flags on the other tiles of their footprint and arrive with none set.
unitst::do_largeocc/undo_largeocc are not mapped in df-structures yet, so the fix either needs those added to symbols, or teleport needs to replicate the footprint update itself (which we would want to verify against a live wagon, since the footprint logic lives in those functions).
Fix in #5924. Rather than mapping do_largeocc/undo_largeocc (which would need per-platform symbol work), teleport now derives the footprint extent from the race's EQUIPMENT_WAGON flag and applies the same occupancy update across all 9 tiles. Verified live: all source tiles clear and all destination tiles set on teleport, and ordinary units keep single-tile behavior.
Activity
Alistair-Afton commentedon Sep 16, 2026
Confirmed.
Units::teleportonly updates theunit/unit_groundedoccupancy bits on the single center tile, so EQUIPMENT-sized units like wagons leave stale flags on the other tiles of their footprint and arrive with none set.unitst::do_largeocc/undo_largeoccare not mapped in df-structures yet, so the fix either needs those added to symbols, or teleport needs to replicate the footprint update itself (which we would want to verify against a live wagon, since the footprint logic lives in those functions).Alistair-Afton commentedon Sep 16, 2026
Fix in #5924. Rather than mapping
do_largeocc/undo_largeocc(which would need per-platform symbol work), teleport now derives the footprint extent from the race'sEQUIPMENT_WAGONflag and applies the same occupancy update across all 9 tiles. Verified live: all source tiles clear and all destination tiles set on teleport, and ordinary units keep single-tile behavior.Units::teleport: update occupancy for the full EQUIPMENT footprint