Skip to content

Commit be9d1e2

Browse files
committed
crash fix
1 parent 585fe11 commit be9d1e2

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

data/plugins/MaxPayne3.FusionFix.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[MAIN]
22
HideSkipButton = 1
3+
DisableGlobalLeaderboards = 1 // Fixes Hoboken Alleys map crash in coop
34
OutlinesSizeMultiplier = 1.0f

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# MaxPayne3.FusionFix
88

99
This is a small project intended to add ability to hide ![skip](https://i.imgur.com/vwELI93.png) button in Max Payne 3.
10-
Additionally, added an option to increase the size of subtitle text outlines.
10+
Additionally, added an option to increase the size of subtitle text outlines and prevent Hoboken Alleys coop map from crashing the game.
1111

1212
## Installation:
1313

source/dllmain.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void Init()
2222
{
2323
CIniReader iniReader("");
2424
bool bHideSkipButton = iniReader.ReadInteger("MAIN", "HideSkipButton", 1) != 0;
25+
bool bDisableGlobalLeaderboards = iniReader.ReadInteger("MAIN", "DisableGlobalLeaderboards", 1) != 0;
2526
fOutlinesSizeMultiplier = iniReader.ReadFloat("MAIN", "OutlinesSizeMultiplier", 0.0f);
2627

2728
if (bHideSkipButton)
@@ -48,6 +49,12 @@ void Init()
4849
pattern = hook::pattern("E8 ? ? ? ? F3 0F 10 44 24 ? 8D 4C 24 30 F3 0F 11 05 ? ? ? ? F3 0F 10 44 24 ? 51 B9 ? ? ? ? F3 0F 11 05 ? ? ? ? E8 ? ? ? ? 8A 5C 24 0F 80 FB FF 75 0C");
4950
injector::MakeCALL(pattern.get_first(0), sub_010AFD30, true);
5051
}
52+
53+
if (bDisableGlobalLeaderboards)
54+
{
55+
auto pattern = hook::pattern("6A 00 68 ? ? ? ? E8 ? ? ? ? 8B 0F");
56+
injector::WriteMemory<uint8_t>(pattern.get_first(1), 0x01, true);
57+
}
5158
}
5259

5360
CEXP void InitializeASI()

0 commit comments

Comments
 (0)