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;
|
||||
|
||||
LOG_INFO(LogDev, "SeatIndex: {}", SeatIdx);
|
||||
LOG_INFO(LogDev, "[GetVehicleWeaponForSeat] SeatIndex: {}", SeatIdx);
|
||||
|
||||
UObject* WeaponComponent = nullptr;
|
||||
|
||||
|
||||
@@ -1596,6 +1596,8 @@ 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 (GameState->GetGamePhase() > EAthenaGamePhase::Warmup)
|
||||
{
|
||||
static auto bAllowSpectateAfterDeathOffset = GameMode->GetOffset("bAllowSpectateAfterDeath");
|
||||
|
||||
@@ -1614,6 +1616,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IsRestartingSupported() && Globals::bAutoRestart && !bIsInAutoRestart)
|
||||
{
|
||||
|
||||
@@ -436,7 +436,7 @@ void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerControl
|
||||
|
||||
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);
|
||||
|
||||
// PawnAsFort->ServerChoosePart(EFortCustomPartType::Backpack, backpackPart);
|
||||
|
||||
@@ -246,12 +246,13 @@ void AFortPlayerPawn::UnEquipVehicleWeaponDefinition(UFortWeaponItemDefinition*
|
||||
if (bShouldUpdate)
|
||||
WorldInventory->Update();
|
||||
|
||||
auto PickaxeInstance = WorldInventory->GetPickaxeInstance();
|
||||
auto LastItemInstance = WorldInventory->GetPickaxeInstance(); // Bad, we should get the last item.
|
||||
|
||||
if (!PickaxeInstance)
|
||||
if (!LastItemInstance)
|
||||
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)
|
||||
@@ -286,8 +287,9 @@ void AFortPlayerPawn::StartGhostModeExitHook(UObject* Context, FFrame* Stack, vo
|
||||
|
||||
AActor* AFortPlayerPawn::ServerOnExitVehicleHook(AFortPlayerPawn* PlayerPawn, ETryExitVehicleBehavior ExitForceBehavior)
|
||||
{
|
||||
auto VehicleWeaponDefinition = PlayerPawn->GetVehicleWeaponDefinition(PlayerPawn->GetVehicle());
|
||||
LOG_INFO(LogDev, "VehicleWeaponDefinition: {}", VehicleWeaponDefinition ? VehicleWeaponDefinition->GetFullName() : "BadRead");
|
||||
auto Vehicle = PlayerPawn->GetVehicle();
|
||||
auto VehicleWeaponDefinition = PlayerPawn->GetVehicleWeaponDefinition(Vehicle);
|
||||
LOG_INFO(LogDev, "[Leave] {} VehicleWeaponDefinition: {}", __int64(Vehicle), VehicleWeaponDefinition ? VehicleWeaponDefinition->GetFullName() : "BadRead");
|
||||
PlayerPawn->UnEquipVehicleWeaponDefinition(VehicleWeaponDefinition);
|
||||
|
||||
return ServerOnExitVehicleOriginal(PlayerPawn, ExitForceBehavior);
|
||||
|
||||
@@ -118,6 +118,9 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
||||
|
||||
bool bSendHelpMessage = false;
|
||||
|
||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
|
||||
if (Arguments.size() >= 1)
|
||||
{
|
||||
auto& Command = Arguments[0];
|
||||
@@ -769,15 +772,12 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
||||
}
|
||||
else if (Command == "pausesafezone")
|
||||
{
|
||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
|
||||
// GameMode->PauseSafeZone(GameState->IsSafeZonePaused() == 0);
|
||||
}
|
||||
else if (Command == "teleport" || Command == "tp")
|
||||
{
|
||||
auto CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||
UCheatManager*& CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||
|
||||
if (!CheatManager)
|
||||
{
|
||||
@@ -789,6 +789,11 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
||||
CheatManager = nullptr;
|
||||
SendMessageToConsole(PlayerController, L"Teleported!");
|
||||
}
|
||||
else if (Command == "startaircraft")
|
||||
{
|
||||
GameMode->StartAircraftPhase();
|
||||
SendMessageToConsole(PlayerController, L"Started aircraft!");
|
||||
}
|
||||
else if (Command == "wipequickbar" || Command == "wipequickbars")
|
||||
{
|
||||
bool bWipePrimary = false;
|
||||
@@ -879,7 +884,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
||||
}
|
||||
else if (Command == "destroytarget")
|
||||
{
|
||||
auto CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||
UCheatManager*& CheatManager = ReceivingController->SpawnCheatManager(UCheatManager::StaticClass());
|
||||
|
||||
if (!CheatManager)
|
||||
{
|
||||
@@ -943,6 +948,7 @@ 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 wipequickbars <RemoveUndroppables=false> - Wipes primary and secondary quickbar of targeted player (parameter is not case sensitive).
|
||||
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
|
||||
)";
|
||||
|
||||
@@ -1519,6 +1519,9 @@ static inline uint64 FindGetNetMode()
|
||||
|
||||
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();
|
||||
|
||||
if (!Addrr)
|
||||
|
||||
@@ -794,7 +794,9 @@ static inline void MainUI()
|
||||
|
||||
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"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user