This is an update for the infinite loop found by Killer gorilla.
reference post viewtopic.php?f=8&t=53118
D2 never sleeps... Even if you had a 50,000 MHZ processor, it would still consume 100% of the clock cycles for a single core, 50% of clock cycles for dual cores... so on.
If I could only have 1 fix for D2 this would be it. D2 was consuming 25% of my 3.8 GHZ quad core processor... after this fix it dropped to ~1%. It amazes me that Blizzard never fixed this.
Code: Select all
Infinite Loop Bug in Function PeekmessageA (Begins at 6FAD76A3) D2client.dll
change
6FAD7713 |. 75 17 |JNZ SHORT 6FAD772C ; single player
6FAD7715 |. A1 DCD1BC6F |MOV EAX,DWORD PTR DS:[6FBCD1DC]
6FAD771A |. 83F8 06 |CMP EAX,6
6FAD771D |. 74 0D |JE SHORT 6FAD772C
6FAD7715 |. A1 DCD1BC6F MOV EAX,DWORD PTR DS:[6FBCD1DC]
6FAD771A |. 83F8 06 CMP EAX,6
6FAD771D 74 0D JE SHORT 6FAD772C
6FAD771F |. 83F8 08 CMP EAX,8
6FAD7722 74 08 JE SHORT 6FAD772C ;multi player
6FAD7724 |. 6A 0A PUSH 0A ; Time = 10. ms
To
6FAD7713 90 NOP
6FAD7714 90 NOP
6FAD771A |. 83F8 06 |CMP EAX,6
6FAD771D |. 74 0D |JE SHORT 6FAD772C
6FAD7715 |. A1 DCD1BC6F MOV EAX,DWORD PTR DS:[6FBCD1DC]
6FAD771A |. 83F8 06 CMP EAX,6
6FAD771D 74 0D JE SHORT 6FAD772C
6FAD771F |. 83F8 08 CMP EAX,8
6FAD7722 90 NOP
6FAD7723 90 NOP
6FAD7724 |. 6A 0A PUSH 0A ; Time = 10. ms