@fois Nice work on the plugins. Great stuff here

Rebuilt your autowarlat thing in ASM and added a fix for that annoying "*\/:><|+^&" message.
Feel free to use this if you want.
; Autowarlat by fois. ASM conversion and additions from Lambchops
.486
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
PATCH_CALL_LOC equ 420E01h ; location of call offset to patch
PATCH_CALL_TARGET equ 477E60h ; original patched call target
LAT_CALL_LOC equ 477CC0h ; address of latency set target
PATCH_LEN equ 4h
STRINGTABLE_PTR equ 4AE10Ch ; location of game system string table
STRING_OFFSET equ 0AF5h ; offset of lat(0) message
WARLAT_LOC equ 47862Eh ; location of orig warlat patch
WARLAT_LEN equ 7h
.code
patch_func:
; call orginal target func
mov eax,PATCH_CALL_TARGET
call eax
; patch string table
mov eax,STRINGTABLE_PTR
mov eax,[eax]
add eax,STRING_OFFSET
mov dword ptr[eax], 074754103h
mov dword ptr[eax+4],07261576Fh
mov dword ptr[eax+8],03A74616Ch
mov byte ptr[eax+12],20h
; set latency call
push 0
mov eax,LAT_CALL_LOC
call eax
pop eax
ret
w2p_init proc
pushad
mov ebx,esp ; local loc
push 0 ; alloc local
; warlat patch
push ebx
push 4
push WARLAT_LEN
push WARLAT_LOC
call VirtualProtect
mov eax,WARLAT_LOC
mov dword ptr[eax],00499090h
mov dword ptr[eax+3],90909090h
push ebx
push [ebx]
push WARLAT_LEN
push WARLAT_LOC
call VirtualProtect
; autowarlat patch
push ebx
push 4
push PATCH_LEN
push PATCH_CALL_LOC
call VirtualProtect
mov edx,PATCH_CALL_LOC+4
mov eax,OFFSET patch_func
sub eax,edx
mov [edx-4],eax
push ebx
push [ebx]
push PATCH_LEN
push PATCH_CALL_LOC
call VirtualProtect
pop eax ; deaclloc local
popad
ret
w2p_init endp
DllMain proc hModule:DWORD, dwReason:DWORD, reserved:DWORD
mov eax,1
ret
DllMain endp
end DllMain
;autowarlat.def
;
;LIBRARY autowarlat
;EXPORTS
;w2p_init
-- edit --
or if you want you can just zero the string and disable the message alltogether
like:
; patch string table
mov eax,STRINGTABLE_PTR
mov eax,[eax]
add eax,STRING_OFFSET
mov dword ptr[eax], 0h
of course it only changes the message on the local client, other players not using the plugin will still see "*\/:><|+^&"
