Skip to content

Commit

Permalink
Disable CustomGS in multiplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Jun 9, 2024
1 parent c9d404d commit c801eb9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Misc/Hooks.Gamespeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ DEFINE_HOOK(0x69BAE7, SessionClass_Resume_CampaignGameSpeed, 0xA)
return 0x69BAF1;
}

constexpr reference<CDTimerClass, 0x887348> FrameTimer;

DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)
{
constexpr reference<CDTimerClass, 0x887348> FrameTimer;
//constexpr reference<CDTimerClass, 0x887328> NFTTimer;
if (!Phobos::Misc::CustomGS)
if (!Phobos::Misc::CustomGS || SessionClass::IsMultiplayer())
return 0;
if ((Phobos::Misc::CustomGS_ChangeInterval[FrameTimer->TimeLeft] > 0)
&& (GameSpeedTemp::counter % Phobos::Misc::CustomGS_ChangeInterval[FrameTimer->TimeLeft] == 0))
Expand All @@ -38,8 +39,8 @@ DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)

DEFINE_HOOK(0x55E33B, SyncDelay_End, 0x6)
{
constexpr reference<CDTimerClass, 0x887348> FrameTimer;
FrameTimer->TimeLeft = GameOptionsClass::Instance->GameSpeed;
if (Phobos::Misc::CustomGS && SessionClass::IsSingleplayer())
FrameTimer->TimeLeft = GameOptionsClass::Instance->GameSpeed;
return 0;
}

Expand Down

0 comments on commit c801eb9

Please sign in to comment.