Skip to content

Commit

Permalink
CVarManager console: Allow raw console execution of some commands
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Mar 3, 2024
1 parent f302c74 commit 1aa28fe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mods/vr/CVarManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ void CVarManager::display_console() {
GameThreadWorker::get().enqueue([command, widened_args]() {
command->Execute(widened_args);
});
} else if (object == nullptr) {
// Try UEngine::Exec
std::string entire_command_str{entire_command.data()};
GameThreadWorker::get().enqueue([entire_command_str]() {
auto engine = sdk::UGameEngine::get();
if (engine != nullptr) {
engine->exec(utility::widen(entire_command_str).data());
}
});
}
}

Expand Down

0 comments on commit 1aa28fe

Please sign in to comment.