Skip to content

Commit

Permalink
Introduce OBSTRUCTSBUILDING category for props to block construction (
Browse files Browse the repository at this point in the history
  • Loading branch information
4z0t authored Jul 7, 2023
1 parent 198e00f commit 71f3206
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ This are just the patch files for this game. I decided to separate them from pat
- hooks/LuaMessages.cpp

## Additions
- Adds new category 'OBSTRUCTSBUILDING' for props to block buildings from being build on top of those
- hooks/Reclaimable.cpp
- section/Reclaimable.cpp
- Allows changing army of ACUs
- hooks/HTransferACUs.cpp
- Allows customize colors for team color mode
Expand Down
5 changes: 5 additions & 0 deletions hooks/Reclaimable.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "../define.h"
asm(
".section h0; .set h0,0x005F6ED2;"
"push "QU(OBSTRUCTSBUILDING)";"
);
8 changes: 4 additions & 4 deletions section/GetTableSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ void IsTableEmpty()
asm(
"MOV EAX,[ESI+0xC];"
"CMP EAX,[ESI+0x8];"
"JAE L72;"
"JAE L072;"
"CMP DWORD PTR [EAX],0x5;"
"JNE L72;"
"JNE L072;"
"MOV EAX,[EAX+0x4];"
"MOV CL,[EAX+0x9];"
"TEST CL,CL;"
Expand All @@ -73,15 +73,15 @@ void IsTableEmpty()
"L22:;"
"MOV EDX,[EAX+0x20];"
"TEST EDX,EDX;"
"JZ L72;"
"JZ L072;"
"MOV ECX,[EAX+0x10];"
"ITE_L5:;"
"CMP DWORD PTR [ECX],0x0;"
"JNE L62;"
"ADD ECX,0x8;"
"DEC EDX;"
"JNZ ITE_L5;"
"L72:;"
"L072:;"
"PUSH 0x1;"
"JMP L12;"
"L62:;"
Expand Down
1 change: 1 addition & 0 deletions section/Reclaimable.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
char OBSTRUCTSBUILDING[] = "OBSTRUCTSBUILDING";

0 comments on commit 71f3206

Please sign in to comment.