|
for (int32_t i = 0; i < 5; ++i) |
The increment condition should only trigger if a stone was successfully placed, otherwise this will create orderings with holes.
Using the 1.10 asm to verify;
jump condition:
6FC99F35 |. 66:833C73 00 |CMP WORD PTR [EBX+ESI*2],0
6FC99F3A |. 75 3C |JNZ SHORT D2Game.6FC99F78
loop epilogue:
6FC99F6E |. 66:8B54AC 14 |MOV DX,WORD PTR [ESP+EBP*4+14]
6FC99F73 |. 45 |INC EBP
6FC99F74 |. 66:891473 |MOV WORD PTR [EBX+ESI*2],DX
6FC99F78 |> 83FD 05 |CMP EBP,5
6FC99F7B |.^ 7C 96 \JL SHORT D2Game.6FC99F13
note the target of the jump is after the counter increment.
D2MOO/source/D2Game/src/QUESTS/ACT1/A1Q4.cpp
Line 250 in 1901980
The increment condition should only trigger if a stone was successfully placed, otherwise this will create orderings with holes.
Using the 1.10 asm to verify;
jump condition:
loop epilogue:
note the target of the jump is after the counter increment.