-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.cpp
36 lines (29 loc) · 859 Bytes
/
class.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include"class.h"
#include"engine.h"
string AActor::GetName()
{
uint32_t Id = *(uint32_t*)((BYTE*)this + 0x18);
return ::GetName(Id);
}
bool AActor::IsVisible(AActor* LocalPlayer, int32_t BoneIndex)
{
TArray<AActor*> ActorsToIgnore;
ActorsToIgnore.push(LocalPlayer, this);
Vector3 End = GetBoneLocation(this->Mesh, BoneIndex);
bool ret = LineTraceSingle(LocalPlayer->Controller->PlayerCameraManager->Pos, End, ActorsToIgnore);
ActorsToIgnore.Pop();
return ret;
}
void* UGameInstance::GetPlayerController()
{
DWORD64 Data = *(DWORD64*)(this + 0x38);
DWORD64 Player = *(DWORD64*)(Data);
return *(void**)(Player + 0x30);
}
AActor* UGameInstance::GetPlayer()
{
DWORD64 Data = *(DWORD64*)(this + 0x38);
DWORD64 Player = *(DWORD64*)(Data);
DWORD64 PlayerController = *(DWORD64*)(Player + 0x30);
return *(AActor**)(PlayerController + 0x2B8);
}