Skip to content

Commit c801eb9

Browse files
committed
Disable CustomGS in multiplayer
1 parent c9d404d commit c801eb9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Misc/Hooks.Gamespeed.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ DEFINE_HOOK(0x69BAE7, SessionClass_Resume_CampaignGameSpeed, 0xA)
1515
return 0x69BAF1;
1616
}
1717

18+
constexpr reference<CDTimerClass, 0x887348> FrameTimer;
19+
1820
DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)
1921
{
20-
constexpr reference<CDTimerClass, 0x887348> FrameTimer;
2122
//constexpr reference<CDTimerClass, 0x887328> NFTTimer;
22-
if (!Phobos::Misc::CustomGS)
23+
if (!Phobos::Misc::CustomGS || SessionClass::IsMultiplayer())
2324
return 0;
2425
if ((Phobos::Misc::CustomGS_ChangeInterval[FrameTimer->TimeLeft] > 0)
2526
&& (GameSpeedTemp::counter % Phobos::Misc::CustomGS_ChangeInterval[FrameTimer->TimeLeft] == 0))
@@ -38,8 +39,8 @@ DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)
3839

3940
DEFINE_HOOK(0x55E33B, SyncDelay_End, 0x6)
4041
{
41-
constexpr reference<CDTimerClass, 0x887348> FrameTimer;
42-
FrameTimer->TimeLeft = GameOptionsClass::Instance->GameSpeed;
42+
if (Phobos::Misc::CustomGS && SessionClass::IsSingleplayer())
43+
FrameTimer->TimeLeft = GameOptionsClass::Instance->GameSpeed;
4344
return 0;
4445
}
4546

0 commit comments

Comments
 (0)