FPredictionKey FPredictionKey::CreateNewPredictionKey(UAbilitySystemComponent* OwningComponent) { FPredictionKey NewKey; // We should never generate prediction keys on the authority if(OwningComponent->GetOwnerRole() != ROLE_Authority) { NewKey.GenerateNewPredictionKey(); } return NewKey; }
FPredictionKey FPredictionKey::CreateNewServerInitiatedKey(UAbilitySystemComponent* OwningComponent) { FPredictionKey NewKey; // Only valid on the server if (OwningComponent->GetOwnerRole() == ROLE_Authority) { NewKey.GenerateNewPredictionKey(); NewKey.bIsServerInitiated = true; } return NewKey; }
FPredictionKey FPredictionKey::CreateNewPredictionKey() { FPredictionKey NewKey; NewKey.GenerateNewPredictionKey(); return NewKey; }