61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
http://www.bay12games.com/dwarves/mantisbt/view.php?id=4406
|
|
|
|
1. Include store in hospital jobs when recomputing counters
|
|
|
|
0x746d7
|
|
75 D7
|
|
90 90
|
|
|
|
<<<<
|
|
.text:080BC6D7 jnz short loc_80BC6B0
|
|
====
|
|
.text:080BC6D7 nop
|
|
.text:080BC6D8 nop
|
|
>>>>
|
|
|
|
- if (job->getBuildingRef(BUILDING_DESTINATION) != this) continue;
|
|
+ // NOP
|
|
|
|
This reference points to the containers, not the hospital civzone.
|
|
Since fixing this properly is too hard for a patch, just remove the
|
|
check. Most people have only one hospital anyway, and it is better
|
|
to err on the side of caution here.
|
|
|
|
|
|
2. Make the stockpiling code increment the right stock counters
|
|
|
|
0x67cb0e
|
|
0B 04 90
|
|
8B 1C 90
|
|
|
|
0x67cb18
|
|
8B 40 74
|
|
8B 43 74
|
|
|
|
<<<<
|
|
.text:086C4B0E mov eax, [eax+edx*4]
|
|
.text:086C4B11 mov edx, [esp+ecx*4+39Ch+var_2B4]
|
|
.text:086C4B18 mov eax, [eax+74h]
|
|
====
|
|
.text:086C4B0E mov ebx, [eax+edx*4]
|
|
.text:086C4B11 mov edx, [esp+ecx*4+39Ch+var_2B4]
|
|
.text:086C4B18 mov eax, [ebx+74h]
|
|
>>>>
|
|
|
|
- id = civzones[i]->children[child_idx[i]]->id
|
|
+ cur_civzone = civzones[i] // existing var from previous loop
|
|
+ id = cur_civzone->children[child_idx[i]]->id
|
|
|
|
The reason being, later code uses that var (at this point containing
|
|
useless data) to increment counters and amounts in the hospital.
|
|
|
|
|
|
---8<---
|
|
This difference file is created by The Interactive Disassembler
|
|
|
|
Dwarf_Fortress
|
|
000746D7: 75 90
|
|
000746D8: D7 90
|
|
0067CB0F: 04 1C
|
|
0067CB19: 40 43
|