This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AMyGameModeBase::MustSpectate_Implementation(APlayerController* NewPlayerController) const | |
{ | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UFUNCTION(Server, Reliable, WithValidation) | |
void Server_SpectatorReady(); | |
virtual void Server_SpectatorReady_Implementation(); | |
void ASpectatorTestPlayerController::Server_SpectatorReady_Implementation() | |
{ | |
auto pGameMode = Cast<AMyGameModeBase>(GetWorld()->GetAuthGameMode()); | |
if (pGameMode) | |
{ | |
++pGameMode->NumReadySpectator;//pGameMode->OnSpectatorReady(); | |
UE_LOG(LogTemp, Log, TEXT("NumReadySpectator: %d"), pGameMode->NumReadySpectator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AMySpectatorPawn::PossessedBy(class AController* NewController) | |
{ | |
Super::PossessedBy(NewController); | |
auto pPC = Cast<ASpectatorTestPlayerController>(GetController()); | |
if (pPC) | |
{ | |
pPC->Server_SpectatorReady(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AActor::IsWithinNetRelevancyDistance(const FVector& SrcLocation) const | |
{ | |
return FVector::DistSquared(SrcLocation, GetActorLocation()) < NetCullDistanceSquared; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int32 UNetDriver::ServerReplicateActors_ProcessPrioritizedActors( UNetConnection* Connection, const TArray<FNetViewer>& ConnectionViewers, FActorPriority** PriorityActors, const int32 FinalSortedCount, int32& OutUpdated ) | |
{ | |
... | |
// If the actor wasn't recently relevant, or if it was torn off, close the actor channel if it exists for this connection | |
if ( ( !bIsRecentlyRelevant || Actor->bTearOff ) && Channel != NULL ) | |
{ | |
... | |
UE_LOG( LogNetTraffic, Log, TEXT( "- Closing channel for no longer relevant actor %s" ), *Actor->GetName() ); | |
Channel->Close(); | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We have fully received the bunch, so process it. | |
if( Bunch.bClose ) | |
{ | |
... | |
UE_LOG(LogNetTraffic, Log, TEXT("UChannel::ReceivedSequencedBunch: Bunch.bClose == true. Calling ConditionalCleanUp. ChIndex: %i"), ChIndex ); | |
ConditionalCleanUp(); | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void UMyHealthSet::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const | |
{ | |
Super::GetLifetimeReplicatedProps(OutLifetimeProps); | |
DOREPLIFETIME_CONDITION_NOTIFY(UMyHealthSet, Health, COND_None, REPNOTIFY_Always); | |
} | |
void UMyHealthSet::OnRep_Health() | |
{ | |
GAMEPLAYATTRIBUTE_REPNOTIFY(UMyHealthSet, Health); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PredictionKey.NewRejectedDelegate().BindUObject(this, &UAbilitySystemComponent::OnPredictiveMontageRejected, NewAnimMontage); | |
void UAbilitySystemComponent::OnPredictiveMontageRejected(UAnimMontage* PredictiveMontage) | |
{ | |
static const float MONTAGE_PREDICTION_REJECT_FADETIME = 0.25f; | |
UAnimInstance* AnimInstance = AbilityActorInfo.IsValid() ? AbilityActorInfo->GetAnimInstance() : nullptr; | |
if (AnimInstance && PredictiveMontage) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UEBuildPlugin(){ | |
mkdir -p "${PLUGIN_PACKAGE_ARCHIVE_DIR}" | |
PLUGIN_PACKAGE_ARCHIVE_DIR=$(cd "${PLUGIN_PACKAGE_ARCHIVE_DIR}"; pwd) | |
echo "-----------------------------------------------------" | |
echo "UEBuildPlugin: ${PLUGIN_FILE} ${PLUGIN_BUILD_TARGET} to ${PLUGIN_PACKAGE_ARCHIVE_DIR}" | |
echo "-----------------------------------------------------" | |
cmd=" \ | |
'${UE4_ENGINE_ROOT}/Engine/Build/BatchFiles/RunUAT.bat' BuildPlugin \ | |
-Plugin='${PLUGIN_FILE}' -TargetPlatforms=${PLUGIN_BUILD_TARGET} \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2019-08-25T15:18:01.590Z","extensionVersion":"v3.4.2"} |