Skip to content

Commit

Permalink
Use GetActorGuid for scannable actors
Browse files Browse the repository at this point in the history
As per Archengius, this is what vanilla uses. This also matches what
is done in `FGWorldScannableData.cpp`.

Signed-off-by: Angel Pons <[email protected]>
  • Loading branch information
Th3Fanbus committed Nov 3, 2024
1 parent c8ad59b commit a379508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/FactoryGame/Private/FGDropPod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void AFGDropPod::PreSave(FObjectPreSaveContext SaveContext)
// Cache scannable data from the world during the cooking process
// Avoid attempting to cache the data on the CDOs and Archetypes, and objects without a world context
if (SaveContext.IsCooking() && !HasAnyFlags(RF_ClassDefaultObject | RF_ArchetypeObject) && GetWorld() != nullptr) {
mDropPodGuid = GetActorInstanceGuid();
mDropPodGuid = GetActorGuid();
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion Source/FactoryGame/Private/FGItemPickup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void AFGItemPickup::PreSave(FObjectPreSaveContext SaveContext)
// Cache scannable data from the world during the cooking process
// Avoid attempting to cache the data on the CDOs and Archetypes, and objects without a world context
if (SaveContext.IsCooking() && !HasAnyFlags(RF_ClassDefaultObject | RF_ArchetypeObject) && GetWorld() != nullptr) {
mItemPickupGuid = GetActorInstanceGuid();
mItemPickupGuid = GetActorGuid();
}
#endif
}
Expand Down

0 comments on commit a379508

Please sign in to comment.