Guest User

DF windows: stop mistakenly unassigning weapon racks

a guest
Oct 27th, 2012
413
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0x4c05c4
  2. 8B 8C 24 80 00 00 00
  3. 89 C1 90 90 90 90 90
  4.  
  5. <<<<
  6. .text:008C11C4 mov ecx, [esp+98h+var_18]
  7. ====
  8. .text:008C11C4 mov ecx, eax
  9. .text:008C11C6 nop
  10. .text:008C11C7 nop
  11. .text:008C11C8 nop
  12. .text:008C11C9 nop
  13. .text:008C11CA nop
  14. >>>>
  15.  
  16. 0x4c06a1
  17. 8B 8C 24 80 00 00 00
  18. 89 C1 90 90 90 90 90
  19.  
  20. <<<<
  21. .text:008C12A1 mov ecx, [esp+98h+var_18]
  22. ====
  23. .text:008C12A1 mov ecx, eax
  24. .text:008C12A3 nop
  25. .text:008C12A4 nop
  26. .text:008C12A5 nop
  27. .text:008C12A6 nop
  28. .text:008C12A7 nop
  29. >>>>
  30.  
  31.  
  32. basically:
  33.  
  34. b_squad_id = building->getSpecificSquad();
  35. - if (b_squad_id != squad->id || !building->canUse(some_squad_id, 4))
  36. + if (b_squad_id != squad->id || !building->canUse(b_squad_id, 4))
  37. unassign(building);
  38.  
  39. the reason being, some_other_squad_id contains irrelevant garbage at this point
  40.  
  41.  
  42. ---8<---
  43. This difference file is created by The Interactive Disassembler
  44.  
  45. Dwarf Fortress.exe
  46. 004C05C4: 8B 89
  47. 004C05C5: 8C C1
  48. 004C05C6: 24 90
  49. 004C05C7: 80 90
  50. 004C05C8: 00 90
  51. 004C05C9: 00 90
  52. 004C05CA: 00 90
  53. 004C06A1: 8B 89
  54. 004C06A2: 8C C1
  55. 004C06A3: 24 90
  56. 004C06A4: 80 90
  57. 004C06A5: 00 90
  58. 004C06A6: 00 90
  59. 004C06A7: 00 90
RAW Paste Data