Skip to content

Commit

Permalink
Added OutputMaxSP
Browse files Browse the repository at this point in the history
  • Loading branch information
KionX committed Jun 24, 2022
1 parent 45bff88 commit 44fd742
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ This are just the patch files for this game. I decided to separate them from pat
- hooks/WayPointArrive.cpp

## Additions
- GetSessionClients also output maximum sim speed(maxSP)
- hooks/HOutputMaxSP.cpp
- section/OutputMaxSP.cpp
- Console command: "cam_DefaultMiniLOD 0" now completely disable mesh renderer for minimap
- hooks/MinimapMesh.cpp
- section/MinimapMesh.cpp
Expand Down
6 changes: 6 additions & 0 deletions hooks/HOutputMaxSP.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "../define.h"
asm
(
".section h0; .set h0,0x88D623;"
"JMP "QU(OutputMaxSP)";"
);
15 changes: 15 additions & 0 deletions section/OutputMaxSP.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
void OutputMaxSP()
{
const char* s_maxSP = "maxSP";
asm(
"PUSH [ESI+0xD4];"
"PUSH %[s_maxSP];"
"LEA ECX,[ESP+0x2C];"
"CALL 0x9081F0;"
"MOV EBX,0x10;"
"JMP 0x88D628;"
:
: [s_maxSP] "i" (s_maxSP)
:
);
}

0 comments on commit 44fd742

Please sign in to comment.