When I call spawn actor the same pointer is getting returned. It only runs on server. Why is this occurring? I want a new pointer for each actor who spawns PSAbility.
Relevant Code
/** Primary Augmentation */
UPROPERTY(EditDefaultsOnly, Category=Abilities)
TSubclassOf<class APSAbility> PrimAugClass;
class APSAbility* PrimAug; // primary augmentation
And the code for spawning an an instance of the PrimAugClass
FActorSpawnParameters SpawnParameters;
SpawnParameters.bAllowDuringConstructionScript = true;
SpawnParameters.bNoFail = true;
SpawnParameters.Instigator = Instigator;
SpawnParameters.Name = TEXT("PrimaryAugmentation");
SpawnParameters.Owner = Instigator;
SpawnParameters.Template = NULL;
const FRotator SpawnRotation = GetControlRotation();
const FVector SpawnLocation = GetActorLocation() + SpawnRotation.RotateVector(GunOffset);
PrimAug = World->SpawnActor<APSAbility>( PrimAugClass, SpawnParameters );
PrimAug->SetMyOwner(this);
If you need me to include code regarding APSAbility, and the PrimAugClass, let me know.
Thank you!