Skip to content

Commit

Permalink
fix e3d88b1 conservatively
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Jun 7, 2024
1 parent 8f81eee commit 7a22efe
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 46 deletions.
4 changes: 2 additions & 2 deletions src/Misc/Hooks.Gamespeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)
{
constexpr reference<SysTimerClass, 0x887348> FrameTimer;
//constexpr reference<SysTimerClass, 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 @@ -39,7 +39,7 @@ DEFINE_HOOK(0x55E160, SyncDelay_Start, 0x6)
DEFINE_HOOK(0x55E33B, SyncDelay_End, 0x6)
{
constexpr reference<SysTimerClass, 0x887348> FrameTimer;
if (Phobos::Misc::CustomGS)
if (Phobos::Misc::CustomGS && SessionClass::IsSingleplayer())
FrameTimer->TimeLeft = GameOptionsClass::Instance->GameSpeed;
return 0;
}
Expand Down
14 changes: 0 additions & 14 deletions src/Misc/PlaceHolders.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions src/Phobos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,36 +200,6 @@ DEFINE_HOOK(0x67E68A, LoadGame_UnsetFlag, 0x5)
return 0;
}

DEFINE_HOOK(0x48CE6D, MainGame_AfterSpawnerStartGame, 0x6)
{
// Please make sure that Ares or Spawner didn't hook or skip anything in these places

if (SessionClass::IsMultiplayer())
{
// Phobos hooks:

// Commands/FrameByFrame.cpp
Patch::Apply_RAW(0x55D871, // Revert MainLoop_FrameStep_End
{ 0x81, 0xC4, 0xB4, 0x01, 0x00, 0x00 });
Patch::Apply_RAW(0x55DEC1, // Revert MainLoop_FrameStep_End
{ 0x81, 0xC4, 0xB4, 0x01, 0x00, 0x00 });
Patch::Apply_RAW(0x55DED5, // Revert MainLoop_FrameStep_End
{ 0x81, 0xC4, 0xB4, 0x01, 0x00, 0x00 });

Patch::Apply_RAW(0x55D360, // Revert MainLoop_FrameStep_Begin
{ 0xA0,0xA0,0xE9,0xA8,0x00 });

// Misc/Hooks.Gamespeed.cpp
Patch::Apply_RAW(0x55E160, // Revert SyncDelay_Start
{ 0x8B, 0x0D, 0x48, 0x73, 0x88, 0x00 });
Patch::Apply_RAW(0x55E33B, // Revert SyncDelay_End
{ 0xA0,0x94,0xCD,0xAB,0x00 });

}

return 0;
}

#ifndef IS_RELEASE_VER
DEFINE_HOOK(0x4F4583, GScreenClass_DrawText, 0x6)
{
Expand Down

0 comments on commit 7a22efe

Please sign in to comment.