Skip to content

Commit

Permalink
Merge branch 'KZGlobalTeam:dev' into fkz
Browse files Browse the repository at this point in the history
  • Loading branch information
jvnipers authored Jan 27, 2025
2 parents 3d5609d + 5fd81a3 commit 50aa517
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/kz/mode/kz_mode_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ void KZModeManager::UnregisterMode(const char *modeName)
for (u32 i = 0; i < MAXPLAYERS + 1; i++)
{
KZPlayer *player = g_pKZPlayerManager->ToPlayer(i);
if (!player->IsInGame())
{
continue;
}
if (strcmp(player->modeService->GetModeName(), modeName) == 0 || strcmp(player->modeService->GetModeShortName(), modeName) == 0)
{
this->SwitchToMode(player, "VNL");
Expand Down
5 changes: 4 additions & 1 deletion src/utils/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ void hooks::Cleanup()

SH_REMOVE_HOOK_ID(createLoadingSpawnGroupHook);

GameEntitySystem()->RemoveListenerEntity(&entityListener);
if (GameEntitySystem())
{
GameEntitySystem()->RemoveListenerEntity(&entityListener);
}
}

// Entity hooks
Expand Down

0 comments on commit 50aa517

Please sign in to comment.