Skip to content

Commit

Permalink
Fallback scan function typo
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jun 14, 2023
1 parent 3c06f13 commit 9bb8a22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shared/sdk/UGameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ std::optional<uintptr_t> UGameEngine::get_tick_address() {
if (!string_ref) {
return std::nullopt;
}

SPDLOG_INFO("Found causeevent= string ref: {:x}", *string_ref);

const auto engine = UEngine::get();
if (engine == nullptr) {
Expand All @@ -164,7 +166,7 @@ std::optional<uintptr_t> UGameEngine::get_tick_address() {
};

if (!result) {
result = fallback_search_slow();
result = fallback_search_fast();

if (result) {
SPDLOG_INFO("Found UGameEngine::Tick via fast fallback scan");
Expand All @@ -179,6 +181,8 @@ std::optional<uintptr_t> UGameEngine::get_tick_address() {
const auto engine = UEngine::get();

if (engine != nullptr) {
SPDLOG_INFO("Checking if {:x} resides within the vtable at {:x}", *result, *(uintptr_t*)engine);

// Double check via the vtable that this function is actually UGameEngine::Tick
const auto vtable = *(uintptr_t**)engine;
bool exists = false;
Expand Down

0 comments on commit 9bb8a22

Please sign in to comment.