fix some versions

fixed s18 (I think), did something to teams, reverted harvesting thing because it was buggy
This commit is contained in:
Milxnor
2023-06-20 08:36:24 -04:00
parent 6ec6815bbb
commit 779c932b3f
9 changed files with 46 additions and 15 deletions

View File

@@ -20,10 +20,16 @@ uint8 AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook(AFortGameS
if (!PlayerState)
continue;
// return PlayerState->GetTeamIndex() - NumToSubtractFromSquadId;
static auto UniqueIdOffset = PlayerState->GetOffset("UniqueId");
if (IsBadReadPtr(PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)))
continue;
if (PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)->IsIdentical((FUniqueNetIdRepl*)&UniqueId))
{
LOG_INFO(LogDev, "Found!");
return PlayerState->GetTeamIndex() - NumToSubtractFromSquadId;
}
}