mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
Fix 4MCP
This commit is contained in:
@@ -6,7 +6,7 @@ UFortWeaponItemDefinition* AFortAthenaVehicle::GetVehicleWeaponForSeat(int SeatI
|
|||||||
|
|
||||||
UFortWeaponItemDefinition* VehicleWeaponDefinition = nullptr;
|
UFortWeaponItemDefinition* VehicleWeaponDefinition = nullptr;
|
||||||
|
|
||||||
LOG_INFO(LogDev, "SeatIndex: {}", SeatIdx);
|
LOG_INFO(LogDev, "[GetVehicleWeaponForSeat] SeatIndex: {}", SeatIdx);
|
||||||
|
|
||||||
UObject* WeaponComponent = nullptr;
|
UObject* WeaponComponent = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -1597,20 +1597,23 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
|
|
||||||
if (Fortnite_Version < 6) // Spectating (is this the actual build or is it like 6.10 when they added it auto).
|
if (Fortnite_Version < 6) // Spectating (is this the actual build or is it like 6.10 when they added it auto).
|
||||||
{
|
{
|
||||||
static auto bAllowSpectateAfterDeathOffset = GameMode->GetOffset("bAllowSpectateAfterDeath");
|
if (GameState->GetGamePhase() > EAthenaGamePhase::Warmup)
|
||||||
|
|
||||||
bool bAllowSpectate = GameMode->Get<bool>(bAllowSpectateAfterDeathOffset);
|
|
||||||
|
|
||||||
LOG_INFO(LogDev, "bAllowSpectate: {}", bAllowSpectate);
|
|
||||||
|
|
||||||
if (bAllowSpectate)
|
|
||||||
{
|
{
|
||||||
LOG_INFO(LogDev, "Starting Spectating!");
|
static auto bAllowSpectateAfterDeathOffset = GameMode->GetOffset("bAllowSpectateAfterDeath");
|
||||||
|
|
||||||
static auto PlayerToSpectateOnDeathOffset = PlayerController->GetOffset("PlayerToSpectateOnDeath");
|
bool bAllowSpectate = GameMode->Get<bool>(bAllowSpectateAfterDeathOffset);
|
||||||
PlayerController->Get<APawn*>(PlayerToSpectateOnDeathOffset) = KillerPawn;
|
|
||||||
|
|
||||||
CreateThread(0, 0, SpectateThread, (LPVOID)PlayerController, 0, 0);
|
LOG_INFO(LogDev, "bAllowSpectate: {}", bAllowSpectate);
|
||||||
|
|
||||||
|
if (bAllowSpectate)
|
||||||
|
{
|
||||||
|
LOG_INFO(LogDev, "Starting Spectating!");
|
||||||
|
|
||||||
|
static auto PlayerToSpectateOnDeathOffset = PlayerController->GetOffset("PlayerToSpectateOnDeath");
|
||||||
|
PlayerController->Get<APawn*>(PlayerToSpectateOnDeathOffset) = KillerPawn;
|
||||||
|
|
||||||
|
CreateThread(0, 0, SpectateThread, (LPVOID)PlayerController, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerControl
|
|||||||
|
|
||||||
if (Globals::bNoMCP)
|
if (Globals::bNoMCP)
|
||||||
{
|
{
|
||||||
static auto CustomCharacterPartClass = FindObject<UClass>("/Script/FortniteGame.CustomCharacterPart");
|
static auto CustomCharacterPartClass = FindObject<UClass>(L"/Script/FortniteGame.CustomCharacterPart");
|
||||||
static auto backpackPart = LoadObject("/Game/Characters/CharacterParts/Backpacks/NoBackpack.NoBackpack", CustomCharacterPartClass);
|
static auto backpackPart = LoadObject("/Game/Characters/CharacterParts/Backpacks/NoBackpack.NoBackpack", CustomCharacterPartClass);
|
||||||
|
|
||||||
// PawnAsFort->ServerChoosePart(EFortCustomPartType::Backpack, backpackPart);
|
// PawnAsFort->ServerChoosePart(EFortCustomPartType::Backpack, backpackPart);
|
||||||
|
|||||||
@@ -246,12 +246,13 @@ void AFortPlayerPawn::UnEquipVehicleWeaponDefinition(UFortWeaponItemDefinition*
|
|||||||
if (bShouldUpdate)
|
if (bShouldUpdate)
|
||||||
WorldInventory->Update();
|
WorldInventory->Update();
|
||||||
|
|
||||||
auto PickaxeInstance = WorldInventory->GetPickaxeInstance();
|
auto LastItemInstance = WorldInventory->GetPickaxeInstance(); // Bad, we should get the last item.
|
||||||
|
|
||||||
if (!PickaxeInstance)
|
if (!LastItemInstance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AFortPlayerController::ServerExecuteInventoryItemHook(PlayerController, PickaxeInstance->GetItemEntry()->GetItemGuid()); // Bad, we should equip the last weapon.
|
PlayerController->ServerExecuteInventoryItemHook(PlayerController, LastItemInstance->GetItemEntry()->GetItemGuid());
|
||||||
|
PlayerController->ClientEquipItem(LastItemInstance->GetItemEntry()->GetItemGuid(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AFortPlayerPawn::StartGhostModeExitHook(UObject* Context, FFrame* Stack, void* Ret)
|
void AFortPlayerPawn::StartGhostModeExitHook(UObject* Context, FFrame* Stack, void* Ret)
|
||||||
@@ -286,8 +287,9 @@ void AFortPlayerPawn::StartGhostModeExitHook(UObject* Context, FFrame* Stack, vo
|
|||||||
|
|
||||||
AActor* AFortPlayerPawn::ServerOnExitVehicleHook(AFortPlayerPawn* PlayerPawn, ETryExitVehicleBehavior ExitForceBehavior)
|
AActor* AFortPlayerPawn::ServerOnExitVehicleHook(AFortPlayerPawn* PlayerPawn, ETryExitVehicleBehavior ExitForceBehavior)
|
||||||
{
|
{
|
||||||
auto VehicleWeaponDefinition = PlayerPawn->GetVehicleWeaponDefinition(PlayerPawn->GetVehicle());
|
auto Vehicle = PlayerPawn->GetVehicle();
|
||||||
LOG_INFO(LogDev, "VehicleWeaponDefinition: {}", VehicleWeaponDefinition ? VehicleWeaponDefinition->GetFullName() : "BadRead");
|
auto VehicleWeaponDefinition = PlayerPawn->GetVehicleWeaponDefinition(Vehicle);
|
||||||
|
LOG_INFO(LogDev, "[Leave] {} VehicleWeaponDefinition: {}", __int64(Vehicle), VehicleWeaponDefinition ? VehicleWeaponDefinition->GetFullName() : "BadRead");
|
||||||
PlayerPawn->UnEquipVehicleWeaponDefinition(VehicleWeaponDefinition);
|
PlayerPawn->UnEquipVehicleWeaponDefinition(VehicleWeaponDefinition);
|
||||||
|
|
||||||
return ServerOnExitVehicleOriginal(PlayerPawn, ExitForceBehavior);
|
return ServerOnExitVehicleOriginal(PlayerPawn, ExitForceBehavior);
|
||||||
|
|||||||
@@ -118,6 +118,9 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
|
|
||||||
bool bSendHelpMessage = false;
|
bool bSendHelpMessage = false;
|
||||||
|
|
||||||
|
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||||
|
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||||
|
|
||||||
if (Arguments.size() >= 1)
|
if (Arguments.size() >= 1)
|
||||||
{
|
{
|
||||||
auto& Command = Arguments[0];
|
auto& Command = Arguments[0];
|
||||||
@@ -769,15 +772,12 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
}
|
}
|
||||||
else if (Command == "pausesafezone")
|
else if (Command == "pausesafezone")
|
||||||
{
|
{
|
||||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
|
||||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
|
||||||
|
|
||||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
|
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
|
||||||
// GameMode->PauseSafeZone(GameState->IsSafeZonePaused() == 0);
|
// GameMode->PauseSafeZone(GameState->IsSafeZonePaused() == 0);
|
||||||
}
|
}
|
||||||
else if (Command == "teleport" || Command == "tp")
|
else if (Command == "teleport" || Command == "tp")
|
||||||
{
|
{
|
||||||
auto CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
UCheatManager*& CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||||
|
|
||||||
if (!CheatManager)
|
if (!CheatManager)
|
||||||
{
|
{
|
||||||
@@ -789,6 +789,11 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
CheatManager = nullptr;
|
CheatManager = nullptr;
|
||||||
SendMessageToConsole(PlayerController, L"Teleported!");
|
SendMessageToConsole(PlayerController, L"Teleported!");
|
||||||
}
|
}
|
||||||
|
else if (Command == "startaircraft")
|
||||||
|
{
|
||||||
|
GameMode->StartAircraftPhase();
|
||||||
|
SendMessageToConsole(PlayerController, L"Started aircraft!");
|
||||||
|
}
|
||||||
else if (Command == "wipequickbar" || Command == "wipequickbars")
|
else if (Command == "wipequickbar" || Command == "wipequickbars")
|
||||||
{
|
{
|
||||||
bool bWipePrimary = false;
|
bool bWipePrimary = false;
|
||||||
@@ -879,7 +884,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
}
|
}
|
||||||
else if (Command == "destroytarget")
|
else if (Command == "destroytarget")
|
||||||
{
|
{
|
||||||
auto CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
UCheatManager*& CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||||
|
|
||||||
if (!CheatManager)
|
if (!CheatManager)
|
||||||
{
|
{
|
||||||
@@ -942,7 +947,8 @@ cheat setpickaxe <PickaxeID> - Set player's pickaxe. Can be either the PID or WI
|
|||||||
cheat destroytarget - Destroys the actor that the player is looking at.
|
cheat destroytarget - Destroys the actor that the player is looking at.
|
||||||
cheat wipequickbar <Primary|Secondary> <RemoveUndroppables=false> - Wipes the specified quickbar (parameters is not case sensitive).
|
cheat wipequickbar <Primary|Secondary> <RemoveUndroppables=false> - Wipes the specified quickbar (parameters is not case sensitive).
|
||||||
cheat wipequickbars <RemoveUndroppables=false> - Wipes primary and secondary quickbar of targeted player (parameter is not case sensitive).
|
cheat wipequickbars <RemoveUndroppables=false> - Wipes primary and secondary quickbar of targeted player (parameter is not case sensitive).
|
||||||
cheat suicide - Makes targeted player suicide.
|
cheat suicide - Makes targeted player suicide.
|
||||||
|
cheat startaircraft - Starts the aircraft (may work).
|
||||||
|
|
||||||
If you want to execute a command on a certain player, surround their name (case sensitive) with \, and put the param with their name anywhere. Example: cheat sethealth \Milxnor\ 100
|
If you want to execute a command on a certain player, surround their name (case sensitive) with \, and put the param with their name anywhere. Example: cheat sethealth \Milxnor\ 100
|
||||||
)";
|
)";
|
||||||
|
|||||||
@@ -1519,6 +1519,9 @@ static inline uint64 FindGetNetMode()
|
|||||||
|
|
||||||
static inline uint64 FindApplyCharacterCustomization()
|
static inline uint64 FindApplyCharacterCustomization()
|
||||||
{
|
{
|
||||||
|
if (std::floor(Fortnite_Version) == 4) // RetrieveCharacterParts return null if dedicated server?????
|
||||||
|
return 0;
|
||||||
|
|
||||||
auto Addrr = Memcury::Scanner::FindStringRef(L"AFortPlayerState::ApplyCharacterCustomization - Failed initialization, using default parts. Player Controller: %s PlayerState: %s, HeroId: %s", false, 0, Fortnite_Version >= 20, true).Get();
|
auto Addrr = Memcury::Scanner::FindStringRef(L"AFortPlayerState::ApplyCharacterCustomization - Failed initialization, using default parts. Player Controller: %s PlayerState: %s, HeroId: %s", false, 0, Fortnite_Version >= 20, true).Get();
|
||||||
|
|
||||||
if (!Addrr)
|
if (!Addrr)
|
||||||
|
|||||||
@@ -794,7 +794,9 @@ static inline void MainUI()
|
|||||||
|
|
||||||
if (!bStartedBus)
|
if (!bStartedBus)
|
||||||
{
|
{
|
||||||
if (Globals::bLateGame.load() || Fortnite_Version >= 11)
|
if (Globals::bLateGame.load()
|
||||||
|
|| Fortnite_Version >= 11 // Its been a minute but iirc it just wouldnt start when countdown ended or crash? cant remember
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (ImGui::Button("Start Bus"))
|
if (ImGui::Button("Start Bus"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user