mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
disable rebooting again
fixed looting bug, fixed parachute not auto deploying on some builds
This commit is contained in:
@@ -6,12 +6,25 @@
|
||||
#include "OnlineReplStructs.h"
|
||||
#include "gui.h"
|
||||
|
||||
uint8 AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook(AFortGameSessionDedicatedAthena* GameSessionDedicated, __int64 UniqueId)
|
||||
uint8 AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook(AFortGameSessionDedicatedAthena* GameSessionDedicated, void* UniqueId)
|
||||
{
|
||||
LOG_INFO(LogDev, "GetSquadIdForCurrentPlayerHook!");
|
||||
|
||||
TArray<AActor*> CONTRTOLLERS = UGameplayStatics::GetAllActorsOfClass(GetWorld(), AFortPlayerControllerAthena::StaticClass());
|
||||
|
||||
auto OwnerUniqueId = (FUniqueNetIdRepl*)UniqueId;
|
||||
|
||||
LOG_INFO(LogDev, "OwnerUniqueId->GetReplicationBytes().Num(): {}", OwnerUniqueId->GetReplicationBytes().Num());
|
||||
|
||||
/*
|
||||
|
||||
for (int i = 0; i < OwnerUniqueId->GetReplicationBytes().Num(); i++)
|
||||
{
|
||||
LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, OwnerUniqueId->GetReplicationBytes().at(i));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
for (int i = 0; i < CONTRTOLLERS.Num(); i++)
|
||||
{
|
||||
auto Controller = (AFortPlayerControllerAthena*)CONTRTOLLERS.at(i);
|
||||
@@ -24,12 +37,14 @@ uint8 AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook(AFortGameS
|
||||
|
||||
static auto UniqueIdOffset = PlayerState->GetOffset("UniqueId");
|
||||
|
||||
if (IsBadReadPtr(PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)))
|
||||
continue;
|
||||
// if (IsBadReadPtr(PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)))
|
||||
// continue;
|
||||
|
||||
if (PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)->IsIdentical((FUniqueNetIdRepl*)&UniqueId))
|
||||
LOG_INFO(LogDev, "PS PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)->GetReplicationBytes().Num(): {}", PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)->GetReplicationBytes().Num());
|
||||
|
||||
if (PlayerState->GetPtr<FUniqueNetIdRepl>(UniqueIdOffset)->IsIdentical(OwnerUniqueId))
|
||||
{
|
||||
LOG_INFO(LogDev, "Found!");
|
||||
LOG_INFO(LogDev, "Found {}!", PlayerState->GetPlayerName().ToString());
|
||||
return PlayerState->GetTeamIndex() - NumToSubtractFromSquadId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user