Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Oct 8, 2024
1 parent e06fe18 commit d99bc29
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
auto sv_addr = (char*)LOCATE_FROM_SIGNATURE(engine, sv_Signature);
if (!sv_addr)
{
LOG_ERROR(PLID, "sv_models not found in engine dll!");
LOG_ERROR(PLID, "sv not found in engine dll!");
return FALSE;
}
CDisasmFindGotPltTargetContext ctx = { 0 };
Expand All @@ -447,11 +447,16 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
if (ctx.result)
{
sv = (decltype(sv))ctx.result;
break;
}

sv_models = (decltype(sv_models))((char*)sv + offset_sv_models);

if (!sv_models)
{
LOG_ERROR(PLID, "sv_models not found in engine dll!");
return FALSE;
}

LOG_MESSAGE(PLID, "sv_models found at %p!", sv_models);
}

Expand Down

0 comments on commit d99bc29

Please sign in to comment.