Skip to content

Commit

Permalink
ADD: spawn manager - fix sound
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3lord committed Sep 22, 2024
1 parent 9e5be3a commit d18d8f2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/xrGame/ImUtils/ImUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ void RegisterImGuiInGame()
InitImGuiSearchInGame();
InitSections();
}
}
}

void DestroyImGuiInGame()
{
DestroySpawnManagerWindow();
}
2 changes: 2 additions & 0 deletions src/xrGame/ImUtils/ImUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,5 +531,7 @@ void RenderSpawnManagerWindow();
void RenderWeaponManagerWindow();
void RenderSearchManagerWindow();

void DestroySpawnManagerWindow();

void RegisterImGuiInGame();
void execute_console_command_deferred(CConsole* c, LPCSTR string_to_execute);
5 changes: 5 additions & 0 deletions src/xrGame/ImUtils/SpawnManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ bool SpawnManager_RenderButtonOrImage(CInifile::Sect* section, const char* imnam
void SpawnManager_HandleButtonPress(CInifile::Sect* section);
void SpawnManager_ProcessSections(Section& sections, size_t& number_imgui);

void DestroySpawnManagerWindow()
{
imgui_spawn_manager.sound_tip.reset();
}

void InitSections()
{
if (g_pClsidManager == nullptr)
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ extern CAI_Space *g_ai_space;

CLevel::~CLevel()
{
DestroyImGuiInGame();
xr_delete (g_player_hud);
delete_data (hud_zones_list);
hud_zones_list = nullptr;
Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/StdAfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@
extern CInifile* pGameGlobals;
#endif

extern void DestroyImGuiInGame();

#undef min
#undef max
1 change: 1 addition & 0 deletions src/xrGame/xrGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CInifile* pGameGlobals = nullptr;

extern void RegisterImGuiInGame();


extern "C"
{
DLL_API void __cdecl xrGameInitialize()
Expand Down

0 comments on commit d18d8f2

Please sign in to comment.