Changes related to 'SetPossessedTangible'

This commit is contained in:
2024-03-25 14:50:06 -04:00
parent 0d94b1b9af
commit d520189a94
6 changed files with 49 additions and 3 deletions

View File

@@ -52,7 +52,13 @@ void UlxTangible::SetActorBlueprint(const FString &name) {
// Now destroy the actor itself. According to various
// documents I've read online, it may be necessary to take
// further steps to delete the object. Not clear.
CurrentActor->Destroy();
CurrentActor->Destroy();
// If this actor previously was posessed by a player controller,
// then it's not posessed anymore, because there is no actor any more.
if (Manager->PossessedTangible == this) {
Manager->PossessedTangible = nullptr;
};
}
// Update the blueprint name