原帖,
http://www.tauniverse.com/forum/showthread.php?p=689085#post689085
Pathfinding cycles limitation hack (tested only in skirimish):
Change TOTALA.exe using hex-editor with that values:
Quote:
[table=98%]
[tr][td]DF91: EBD190
DF64: B8D4140000EB28 [/td][/tr]
[/table]
DF91: EBD1 90 (jmp short newplace)
DF64: B8D4140000EB29 (mov eax,0x000014D4), where B8(move eax) EB29 to jump back, 14d4 is original value multipled by 4
Original value goes from memory [esi+48h], so I can’t find where’s it, that because I changed to jump.
Quote:
[table=98%]
[tr][td].text:0040EB7C mov esi, ecx ; adress
.text:0040EB7E xor ebx, ebx
.text:0040EB80 mov cx, [ebp+2A3Ch]
.text:0040EB87 push edi
.text:0040EB88 cmp cx, bx
.text:0040EB8B jz loc_40EF11
.text:0040EB91 mov eax, [esi+48h] ; 535 [/td][/tr]
[/table]
do not use very high value, during this code in original cycle launchs 1332 times for player1, and 666 for player2 .
CYCLE code - 40e91c-40ef0b
Quote:
[table=98%]
[tr][td].text:0040EF05 sub edx, eax
.text:0040EF07 cmp edi, ebx ; edi=$533 (1331)
.text:0040EF09 mov [ecx], edx
.text:0040EF0B jg loc_40EC91 [/td][/tr]
[/table]
Quote:
[table=98%]
[tr][td].text:0040EC82 cmp edx, 0Ah ; 10playersmax?
.text:0040EC85 jl short cycle2_plimit
.text:0040EC87 cmp [esp+28h+var_18], ebx
.text:0040EC8B jle loc_40EF11
.text:0040EC91
.text:0040EC91 cycle3_pathfind: ; CODE XREF: pathfind+39Bj
.text:0040EC91 mov eax, [esi+58h]
.text:0040EC94 mov [esi+4Ch], ebx
.text:0040EC97 cmp eax, ebx [/td][/tr]
[/table]
我依照Ti的成果,再分析了一点点,这个值是在Load Game时候设置的
0040EAD3 C746 48 35050000 MOV DWORD PTR DS:[ESI+48],535
寻路的限制值 535 在文件中的偏移位置是0x57046
附上OTA和TA33A、TACC的修改补丁
OTA, http://www.tauniverse.com/forum/attachment.php?attachmentid=25636&d=1328732955
寻路限制tTAAC.rar (481 KB)
寻路限制TA33A.rar (481 KB)