This commit is contained in:
Milxnor
2023-03-05 22:30:29 -05:00
parent 472fbdb809
commit ae259f97eb
23 changed files with 982 additions and 54 deletions

View File

@@ -13,6 +13,8 @@ void UWorld::Listen()
constexpr bool bUseBeacons = true;
int Port = 7777;
if (bUseBeacons)
{
static auto BeaconClass = FindObject<UClass>(L"/Script/FortniteGame.FortOnlineBeaconHost");
@@ -27,6 +29,8 @@ void UWorld::Listen()
static bool (*InitHost)(UObject* Beacon) = decltype(InitHost)(Addresses::InitHost);
static void (*PauseBeaconRequests)(UObject* Beacon, bool bPause) = decltype(PauseBeaconRequests)(Addresses::PauseBeaconRequests);
NewBeacon->Get<int>("ListenPort") = Engine_Version < 426 ? Port - 1 : Port;
InitHost(NewBeacon);
PauseBeaconRequests(NewBeacon, false);
@@ -46,8 +50,6 @@ void UWorld::Listen()
NewNetDriver->Get<FName>("NetDriverName") = GameNetDriverName;
GetWorld()->Get("NetDriver") = NewNetDriver;
int Port = 7777;
FURL URL = FURL();
URL.Port = Port - (Engine_Version >= 426);