mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix 3.2
This commit is contained in:
@@ -842,7 +842,7 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
|
||||
if (!WorldInventory)
|
||||
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
|
||||
|
||||
auto PlayerStateAthena = Cast<AFortPlayerStateAthena>(PlayerController->GetPlayerState());
|
||||
auto PlayerStateAthena = Cast<AFortPlayerStateAthena, false>(PlayerController->GetPlayerState());
|
||||
|
||||
if (!PlayerStateAthena)
|
||||
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
|
||||
@@ -885,7 +885,7 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
|
||||
if (!BuildingClass)
|
||||
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
|
||||
|
||||
auto GameState = Cast<AFortGameStateAthena>(Cast<AFortGameMode>(GetWorld()->GetGameMode(), false)->GetGameState(), false);
|
||||
auto GameState = Cast<AFortGameStateAthena, false>(Cast<AFortGameMode, false>(GetWorld()->GetGameMode())->GetGameState());
|
||||
|
||||
auto StructuralSupportSystem = GameState->GetStructuralSupportSystem();
|
||||
|
||||
@@ -1707,11 +1707,7 @@ void AFortPlayerController::ServerBeginEditingBuildingActorHook(AFortPlayerContr
|
||||
|
||||
AFortWeap_EditingTool* EditTool = nullptr;
|
||||
|
||||
#if 1
|
||||
EditTool = Cast<AFortWeap_EditingTool>(Pawn->EquipWeaponDefinition(EditToolDef, EditToolInstance->GetItemEntry()->GetItemGuid()));
|
||||
#else
|
||||
EditTool = Cast<AFortWeap_EditingTool>(Pawn->GetCurrentWeapon());
|
||||
#endif
|
||||
|
||||
if (!EditTool)
|
||||
return;
|
||||
@@ -1783,25 +1779,7 @@ void AFortPlayerController::ServerEndEditingBuildingActorHook(AFortPlayerControl
|
||||
if (!WorldInventory)
|
||||
return;
|
||||
|
||||
AFortWeap_EditingTool* EditTool = nullptr;
|
||||
|
||||
#if 1
|
||||
auto EditToolInstance = WorldInventory->FindItemInstance(EditToolDef);
|
||||
|
||||
if (!EditToolInstance)
|
||||
return;
|
||||
|
||||
FGuid EditToolGuid = EditToolInstance->GetItemEntry()->GetItemGuid(); // Should we ref?
|
||||
|
||||
#if 0
|
||||
EditTool = Cast<AFortWeap_EditingTool>(Pawn->EquipWeaponDefinition(EditToolDef, EditToolGuid)); // ERM
|
||||
#else
|
||||
Cast<AFortWeap_EditingTool>(Pawn->EquipWeaponDefinition(EditToolDef, EditToolGuid)); // ERM
|
||||
EditTool = Cast<AFortWeap_EditingTool>(Pawn->GetCurrentWeapon());
|
||||
#endif
|
||||
#else
|
||||
EditTool = Cast<AFortWeap_EditingTool>(Pawn->GetCurrentWeapon());
|
||||
#endif
|
||||
AFortWeap_EditingTool* EditTool = Cast<AFortWeap_EditingTool>(Pawn->GetCurrentWeapon());
|
||||
|
||||
if (EditTool)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user