Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0006482Dwarf FortressDwarf Mode -- Invasionspublic2014-05-08 13:242014-07-23 15:30
Quietust 
Toady One 
normalminorhave not tried
resolvedfixed 
0.34.11 
0.40.05 
0006482: Campfire renewal logic checks coordinates incorrectly
When siegers try to set campfires, there appears to be logic to check if a campfire is already present in the specified tile, but it's checking the coordinates incorrectly - while it matches the Y and Z coordinates correctly, it compares the campfire's X coordinate to the target location's Z coordinate.

This bug appears to date back to version 0.23.130.23a, where I originally discovered it.
binary patch
Issue History
2014-05-08 13:24QuietustNew Issue
2014-05-08 14:12QuietustNote Added: 0024748
2014-05-08 14:12QuietustTag Attached: binary patch
2014-05-08 14:29QuietustNote Edited: 0024748bug_revision_view_page.php?bugnote_id=0024748#r9254
2014-07-23 10:14Toady OneNote Added: 0027326
2014-07-23 10:14Toady OneStatusnew => resolved
2014-07-23 10:14Toady OneResolutionopen => fixed
2014-07-23 10:14Toady OneAssigned To => Toady One
2014-07-23 15:30FootkerchiefFixed in Version => Next Version

Notes
(0024748)
Quietust   
2014-05-08 14:12   
(edited on: 2014-05-08 14:29)
The following binary patch should fix this bug.

Win32 0.34.11 SDL:
0x244BC6 : 7C -> 74
0x244BC9 : BE 60 -> EB 04
0x244BD5 : 18 -> 38
0x244BD8 : 78 -> 70
0x244BE4 : 89 70 08 8B 15 98 6F 81 01 -> C7 40 08 60 27 00 00 90 90

Anyone attempting to write a patch for Linux can find the relevant code at address 0x8487B3D, where registers ebp/edi/esi contain the X/Y/Z coordinates respectively.

Anyone attempting to write a patch for OSX can find the relevant code at address 0x4C8C0C, where registers ebp/edi/esi contain the X/Y/Z coordinates respectively.

(0027326)
Toady One   
2014-07-23 10:14   
Siege fires are turned off for the time being, but I've fixed the relevant code.