Skip to content

Commit

Permalink
fix: disable view controllers on load
Browse files Browse the repository at this point in the history
Fixes #229
  • Loading branch information
ThisAMJ committed Apr 26, 2024
1 parent 6f8f218 commit 43749e2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Features/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ void Session::Ended() {
return;
}

// Disable any view controllers (cutscene cameras) that might be active
if (!engine->IsOrange()) {
for (auto index = 0; index < Offsets::NUM_ENT_ENTRIES; ++index) {
auto info = entityList->GetEntityInfoByIndex(index);
if (info->m_pEntity == nullptr) continue;
auto entityClass = server->GetEntityClassName(info->m_pEntity);
if (!entityClass || std::strcmp(entityClass, "point_viewcontrol") != 0) continue;
server->AcceptInput(info->m_pEntity, "Disable", 0, 0, {0}, 0);
}
}

this->previousMap = engine->GetCurrentMapName();

auto tick = this->GetTick();
Expand Down

1 comment on commit 43749e2

@ThisAMJ
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit patched betsrighter :)

Please sign in to comment.