Skip to content

Commit 368ca11

Browse files
authored
Make disabling taunts also disable units cheering (#31)
1 parent a7c3fa3 commit 368ca11

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ EXE_OBJS = \
5050
src/single-proc-affinity.o \
5151
src/online_optimizations.o \
5252
src/rage_quit.o \
53+
src/silent_cheer.o \
5354
res/res.o \
5455
sym.o
5556

src/silent_cheer.asm

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
%include "macros/patch.inc"
2+
%include "macros/datatypes.inc"
3+
4+
cextern LANTaunts
5+
cextern WOLTaunts
6+
cextern SessionType
7+
cextern Rules
8+
9+
hack 0x0050C8F4, 0x0050C8F9
10+
.CheckLan:
11+
mov eax, dword[SessionType]
12+
cmp eax, 3 ; GAME_IPX
13+
jne .CheckWol
14+
15+
mov al, byte[LANTaunts]
16+
test al, al
17+
jnz .DoCheer
18+
19+
jmp .SkipCheer
20+
21+
.CheckWol:
22+
mov eax, dword[SessionType]
23+
cmp eax, 4 ; GAME_INTERNET
24+
jne .DoCheer
25+
26+
mov al, byte[WOLTaunts]
27+
test al, al
28+
jnz .DoCheer
29+
30+
jmp .SkipCheer
31+
32+
.DoCheer:
33+
mov eax, dword[Rules]
34+
jmp hackend
35+
36+
.SkipCheer:
37+
jmp 0x0050C910

sym.asm

+3
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ setcglob 0x0052F620, Parse_Command_Line
170170
;CCHyper 18.06.2015
171171
setcglob 0x00A8B31C, AlliesAllowed
172172

173+
setcglob 0x00A8D110, LANTaunts
174+
setcglob 0x00A8D111, WOLTaunts
175+
173176
; Network
174177
setcglob 0x00841F30, ListenPort
175178
setcglob 0x004A1D50, CRC_DWORD

0 commit comments

Comments
 (0)