Skip to content

Commit

Permalink
Merge pull request #7 from Silver-Ore-Team/dev
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
piotrmacha authored May 10, 2024
2 parents 5263cfa + 1b366ba commit e42de2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion plugin/src/Gothic/CMusicSys_Bass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ namespace GOTHIC_NAMESPACE
{
log->Debug("Stop");
m_ActiveTheme = nullptr;
m_BassEngine->StopMusic();
m_DirectMusic->Stop();
}

Expand Down
6 changes: 4 additions & 2 deletions plugin/src/Gothic/Hooks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ namespace GOTHIC_NAMESPACE
{
// G1: 0x004240C0 public: void __thiscall CGameManager::Init(struct HWND__ * &)
// G2A: 0x00424C70 public: void __thiscall CGameManager::Init(struct HWND__ * &)
auto Ivk_CGameManager_Init = Union::CreateHook(reinterpret_cast<void*>(zSwitch(0x004240C0, 0x00424C70)), &CGameManager::Init_Hook, Union::HookType::Hook_CallPatch);
auto Ivk_CGameManager_Init = Union::CreateHook(
GetGameVersion() == ENGINE ? reinterpret_cast<void*>(zSwitch(0x004240C0, 0x00424C70)) : 0,
&CGameManager::Init_Hook, Union::HookType::Hook_CallPatch);
inline void CGameManager::Init_Hook(HWND__*& hwnd)
{
{
static NH::Logger* log = NH::CreateLogger("zBassMusic::CGameManager::Init_Hook");

if (GetGameVersion() != ENGINE)
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/NH/Bass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace NH

if (!file->Ready && file->Loading)
{
static int32_t delay = 500;
static int32_t delay = 10;
log->Debug("{0} is loading, will retry after {1} ms", musicDef.Filename, delay);
MusicDefRetry retry{ MusicDef(musicDef), delay };
m_PlayMusicRetryList.emplace_back(retry);
Expand Down

0 comments on commit e42de2d

Please sign in to comment.