Skip to content

Commit

Permalink
Improvements to DisableChat feature
Browse files Browse the repository at this point in the history
  • Loading branch information
shmocz committed Aug 3, 2024
1 parent 1cde3b2 commit 6917ff7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ EXE_OBJS = \
src/loading.o \
src/graphics-patch.o \
src/copy-protection.o \
src/chat_disable.o \
src/multi_spectators_hack.o \
src/absolute_prism_bug_fix.o \
src/self_spy_exploit_fix.o \
Expand Down
24 changes: 24 additions & 0 deletions src/chat_disable.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%include "macros/patch.inc"
%include "macros/datatypes.inc"

cextern DisableChat

; Don't send message to others.
hack 0x0055EF38, 0x0055EF3E
cmp byte[DisableChat], 0
jz .Reg
jmp 0x0055F056

.Reg:
cmp edi, ebx
mov dword[esp + 0x14], ebx
jmp hackend

; After receiving message, don't play sound if AddMessage returns NULL.
hack 0x0048D97E
cmp eax, 0
je 0x0048D99A

.Reg:
mov eax, [0x008871E0]
jmp hackend

0 comments on commit 6917ff7

Please sign in to comment.