Skip to content

Commit

Permalink
fix(playernames/five): better gamer tag crew component fix for b3095
Browse files Browse the repository at this point in the history
The fix introduced in d1b35aa didn't resolve some broken scenarios.
  • Loading branch information
Disquse committed May 21, 2024
1 parent 0fc6406 commit 9372f1e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions code/components/citizen-playernames-five/src/HookGamerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,6 @@ struct PatternPair
int offset;
};

template<typename T, T Value>
static T Return()
{
return Value;
}

static HookFunction hookFunction([]()
{
const size_t gamerInfoSize = (xbr::IsGameBuildOrGreater<2060>()) ? sizeof(CGamerInfo<2060>) : sizeof(CGamerInfo<1604>);
Expand Down Expand Up @@ -409,8 +403,8 @@ static HookFunction hookFunction([]()
LimitPatch(hook::pattern("83 FB ? 77 ? 48 69 DB").count(1).get(0).get<void>(0));
LimitPatch(hook::pattern("83 FB 33 77 74 48 8B FB").count(1).get(0).get<void>(0));

// There's a new unknown "privilege" check that needs to be patched.
hook::jump(hook::get_pattern("84 C0 74 04 32 C0 EB 11 48 8B D6", -0x21), Return<bool, true>);
// There's a new unknown "privilege" check that needs to be patched. Nuking the whole code block.
hook::nop(hook::get_pattern("8A CB E8 ? ? ? ? 48 85 C0 74 22 48 8B"), 0x2A);
}
else
{
Expand Down

0 comments on commit 9372f1e

Please sign in to comment.