Esempio n. 1
1
//Place all variables that should be replicated in here
void AFPSGCharacter::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(AFPSGCharacter, movementDirection);
	DOREPLIFETIME(AFPSGCharacter, dieCallback);
	DOREPLIFETIME_CONDITION(AFPSGCharacter, currentWeapon, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGCharacter, weaponInventory, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGCharacter, currentHealth, COND_OwnerOnly);
}
void AShooterPlayerController::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME_CONDITION( AShooterPlayerController, bInfiniteAmmo, COND_OwnerOnly );
	DOREPLIFETIME_CONDITION( AShooterPlayerController, bInfiniteClip, COND_OwnerOnly );
}
void ANTPlayerController::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(ANTPlayerController, MaxPredictionPing, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(ANTPlayerController, PredictionFudgeFactor, COND_OwnerOnly);
}
Esempio n. 4
0
//Replicate variables
void ABaseCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps)const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(ABaseCharacter, bFireButtonDown, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ABaseCharacter, bIsSprinting, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ABaseCharacter, bIsAimingDownSights, COND_SkipOwner);
}
Esempio n. 5
0
void UGASAbility::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(UGASAbility, AbilityCastingStarted, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(UGASAbility, AbilityCastingEnded, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(UGASAbility, HitLocation, COND_SkipOwner);
}
Esempio n. 6
0
//Place all variables that should be replicated in here
void AFPSGWeapon::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);
	
	DOREPLIFETIME_CONDITION(AFPSGWeapon, currentAmmunition, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGWeapon, myOwner, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGWeapon, fireCounter, COND_SkipOwner);
}
Esempio n. 7
0
void ACharacter::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
    Super::GetLifetimeReplicatedProps( OutLifetimeProps );

    DOREPLIFETIME_CONDITION( ACharacter, RepRootMotion,				COND_SimulatedOnly );
    DOREPLIFETIME_CONDITION( ACharacter, ReplicatedBasedMovement,	COND_SimulatedOnly );
    DOREPLIFETIME_CONDITION( ACharacter, ReplicatedMovementMode,	COND_SimulatedOnly );
    DOREPLIFETIME_CONDITION( ACharacter, bIsCrouched,				COND_SimulatedOnly );
}
//Place all variables that should be replicated in here
void AFPSGPlayerController::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(AFPSGPlayerController, dieCallback, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGPlayerController, spawnCallback, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGPlayerController, postLoginFinished, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AFPSGPlayerController, postMatchEndFinished, COND_OwnerOnly);
	DOREPLIFETIME(AFPSGPlayerController, respawnTime);
}
Esempio n. 9
0
void AGWWeaponRanged::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(AGWWeaponRanged, RemainingMagazineAmmo, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AGWWeaponRanged, RemaningAmmo, COND_OwnerOnly);
	DOREPLIFETIME(AGWWeaponRanged, ReloadEndCount);
	DOREPLIFETIME(AGWWeaponRanged, ReloadBeginCount);

}
void UGISInventoryBaseComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(UGISInventoryBaseComponent, Tabs, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(UGISInventoryBaseComponent, SlotUpdateInfo, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(UGISInventoryBaseComponent, SlotSwapInfo, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(UGISInventoryBaseComponent, CurrentPickupActor, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(UGISInventoryBaseComponent, LootedItems, COND_OwnerOnly);
}
void AGameplayDebuggingReplicator::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
		DOREPLIFETIME_CONDITION(AGameplayDebuggingReplicator, DebugComponent, COND_OwnerOnly);
		DOREPLIFETIME_CONDITION(AGameplayDebuggingReplicator, LocalPlayerOwner, COND_OwnerOnly);
		DOREPLIFETIME_CONDITION(AGameplayDebuggingReplicator, bIsGlobalInWorld, COND_OwnerOnly);
		DOREPLIFETIME_CONDITION(AGameplayDebuggingReplicator, LastSelectedActorToDebug, COND_OwnerOnly);
#endif
}
void AGameplayDebuggerReplicator::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

#if ENABLED_GAMEPLAY_DEBUGGER
	DOREPLIFETIME_CONDITION(AGameplayDebuggerReplicator, LocalPlayerOwner, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AGameplayDebuggerReplicator, LastSelectedActorToDebug, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AGameplayDebuggerReplicator, ReplicatedObjects, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(AGameplayDebuggerReplicator, Categories, COND_OwnerOnly);
#endif
}
Esempio n. 13
0
void ASWeapon::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(ASWeapon, MyPawn);

	DOREPLIFETIME_CONDITION(ASWeapon, CurrentAmmo, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(ASWeapon, CurrentAmmoInClip, COND_OwnerOnly);
	DOREPLIFETIME_CONDITION(ASWeapon, BurstCounter, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ASWeapon, bPendingReload, COND_SkipOwner);
}
Esempio n. 14
0
void AGameState::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME( AGameState, bMatchHasBegun );
	DOREPLIFETIME( AGameState, bMatchIsOver );
	DOREPLIFETIME( AGameState, SpectatorClass );

	DOREPLIFETIME_CONDITION( AGameState, GameModeClass,	COND_InitialOnly );
	DOREPLIFETIME_CONDITION( AGameState, ElapsedTime,	COND_InitialOnly );
}
Esempio n. 15
0
void AGameState::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME( AGameState, MatchState );
	DOREPLIFETIME( AGameState, SpectatorClass );

	DOREPLIFETIME_CONDITION( AGameState, GameModeClass,	COND_InitialOnly );
	DOREPLIFETIME_CONDITION( AGameState, ElapsedTime,	COND_InitialOnly );

	DOREPLIFETIME( AGameState, ReplicatedWorldTimeSeconds );
}
Esempio n. 16
0
void AMatineeActor::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME_CONDITION( AMatineeActor, MatineeData,		COND_InitialOnly );
	DOREPLIFETIME_CONDITION( AMatineeActor, GroupActorInfos,	COND_InitialOnly );

	DOREPLIFETIME( AMatineeActor, bIsPlaying );
	DOREPLIFETIME( AMatineeActor, bLooping );
	DOREPLIFETIME( AMatineeActor, bReversePlayback );
	DOREPLIFETIME( AMatineeActor, bPaused );
	DOREPLIFETIME( AMatineeActor, PlayRate );
	DOREPLIFETIME( AMatineeActor, InterpPosition );
}
Esempio n. 17
0
void ASWeapon::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(ASWeapon, MyPawn);
	DOREPLIFETIME_CONDITION(ASWeapon, BurstCounter, COND_SkipOwner);
}
Esempio n. 18
0
void UARAbilityComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(UARAbilityComponent, ActionBarOne);
	DOREPLIFETIME_CONDITION(UARAbilityComponent, ActionBars, COND_OwnerOnly);
}
Esempio n. 19
0
void ANimModCharacter::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	// only to local owner: weapon change requests are locally instigated, other clients don't need it
	DOREPLIFETIME_CONDITION(ANimModCharacter, Inventory, COND_OwnerOnly);

	// everyone except local owner: flag change is locally instigated
	DOREPLIFETIME_CONDITION(ANimModCharacter, bIsTargeting, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ANimModCharacter, bWantsToRun, COND_SkipOwner);

	DOREPLIFETIME_CONDITION(ANimModCharacter, LastTakeHitInfo, COND_Custom);

	// everyone
	DOREPLIFETIME(ANimModCharacter, CurrentWeapon);
	DOREPLIFETIME(ANimModCharacter, Health);
}
Esempio n. 20
0
void APawn::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME( APawn, PlayerState ); 
	DOREPLIFETIME( APawn, Controller );

	DOREPLIFETIME_CONDITION( APawn, RemoteViewPitch, 	COND_SkipOwner );
}
void UARAttributeBaseComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(UARAttributeBaseComponent, ActivePeriodicEffects);
	DOREPLIFETIME(UARAttributeBaseComponent, ActiveEffects);

	DOREPLIFETIME(UARAttributeBaseComponent, ModifiedAttribute);
	DOREPLIFETIME_CONDITION(UARAttributeBaseComponent, ChangedAttribute, COND_OwnerOnly);
}
void ALobbyBeaconPlayerState::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(ALobbyBeaconPlayerState, DisplayName);
	DOREPLIFETIME(ALobbyBeaconPlayerState, UniqueId);
	DOREPLIFETIME(ALobbyBeaconPlayerState, PartyOwnerUniqueId);
	DOREPLIFETIME(ALobbyBeaconPlayerState, bInLobby);
	DOREPLIFETIME_CONDITION(ALobbyBeaconPlayerState, ClientActor, COND_OwnerOnly);
}
void APlayerState::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	Super::GetLifetimeReplicatedProps( OutLifetimeProps );

	DOREPLIFETIME( APlayerState, Score );

	DOREPLIFETIME( APlayerState, PlayerName );
	DOREPLIFETIME( APlayerState, bIsSpectator );
	DOREPLIFETIME( APlayerState, bOnlySpectator );
	DOREPLIFETIME( APlayerState, bFromPreviousLevel );
	DOREPLIFETIME( APlayerState, StartTime );

	DOREPLIFETIME_CONDITION( APlayerState, Ping,		COND_SkipOwner );

	DOREPLIFETIME_CONDITION( APlayerState, PlayerId,	COND_InitialOnly );
	DOREPLIFETIME_CONDITION( APlayerState, bIsABot,		COND_InitialOnly );
	DOREPLIFETIME_CONDITION( APlayerState, bIsInactive, COND_InitialOnly );
	DOREPLIFETIME_CONDITION( APlayerState, UniqueId,	COND_InitialOnly );
}
Esempio n. 24
0
void AShooterCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME_CONDITION(AShooterCharacter, bIsJumping, COND_SkipOwner);

	DOREPLIFETIME(AShooterCharacter, Health);
	DOREPLIFETIME(AShooterCharacter, LastTakeHitInfo);
	DOREPLIFETIME(AShooterCharacter, CurrentWeapon);
	DOREPLIFETIME(AShooterCharacter, Inventory);
}
void ASCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	// Value is already updated locally, skip in replication step
	DOREPLIFETIME_CONDITION(ASCharacter, bWantsToRun, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ASCharacter, bIsTargeting, COND_SkipOwner);
	DOREPLIFETIME_CONDITION(ASCharacter, bIsJumping, COND_SkipOwner);

	// Replicate to every client, no special condition required
	DOREPLIFETIME(ASCharacter, Health);
	DOREPLIFETIME(ASCharacter, Hunger);

	DOREPLIFETIME(ASCharacter, LastTakeHitInfo);

	DOREPLIFETIME(ASCharacter, CurrentWeapon);
	DOREPLIFETIME(ASCharacter, Inventory);
	/* If we did not display the current inventory on the player mesh we could optimize replication by using this replication condition. */
	/* DOREPLIFETIME_CONDITION(ASCharacter, Inventory, COND_OwnerOnly);*/
}
void UAREquipmentComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(UAREquipmentComponent, TargetCharacter);
	DOREPLIFETIME(UAREquipmentComponent, TargetController);

	DOREPLIFETIME_CONDITION(UAREquipmentComponent, Inventory, COND_OwnerOnly);

	DOREPLIFETIME(UAREquipmentComponent, ActiveLeftHandWeapon);
	DOREPLIFETIME(UAREquipmentComponent, ActiveRightHandWeapon);

	DOREPLIFETIME_CONDITION(UAREquipmentComponent, EquipmentSlots, COND_OwnerOnly);

	DOREPLIFETIME(UAREquipmentComponent, ChestItem);
	/*
		This shit is very heavy, but... For 8 players coop, who cares ?

		*/
	DOREPLIFETIME(UAREquipmentComponent, LeftHandWeapons);
	DOREPLIFETIME(UAREquipmentComponent, RightHandWeapons);
}
//=============================================================================
void UGripMotionControllerComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{

	// I am skipping the Scene and Primitive component replication here
	// Generally components aren't set to replicate anyway and I need it to NOT pass the Relative position through the network
	// There isn't much in the scene component to replicate anyway and primitive doesn't have ANY replicated variables
	// Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	// Skipping the owner with this as the owner will use the controllers location directly
	DOREPLIFETIME_CONDITION(UGripMotionControllerComponent, ReplicatedControllerTransform, COND_SkipOwner);
	DOREPLIFETIME(UGripMotionControllerComponent, GrippedActors);
	DOREPLIFETIME(UGripMotionControllerComponent, ControllerNetUpdateRate);
//	DOREPLIFETIME(UGripMotionControllerComponent, bReplicateControllerTransform);
}
void UAREquipmentComponent::GetLifetimeReplicatedProps(TArray< class FLifetimeProperty > & OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(UAREquipmentComponent, TargetCharacter);
	DOREPLIFETIME(UAREquipmentComponent, TargetController);

	//DOREPLIFETIME(UAREquipmentComponent, IsInventoryChanged);

	DOREPLIFETIME_CONDITION(UAREquipmentComponent, Inventory, COND_OwnerOnly);
	//DOREPLIFETIME(UAREquipmentComponent, InventoryData);

	DOREPLIFETIME(UAREquipmentComponent, ActiveLeftHandWeapon);
	DOREPLIFETIME(UAREquipmentComponent, ActiveRightHandWeapon);

	DOREPLIFETIME(UAREquipmentComponent, ChestItem);
}
Esempio n. 29
0
void AActor::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
	GetLifetimeBlueprintReplicationList( this, Cast< UBlueprintGeneratedClass >( GetClass() ), OutLifetimeProps );

	DOREPLIFETIME( AActor, Role );
	DOREPLIFETIME( AActor, RemoteRole );
	DOREPLIFETIME( AActor, Owner );
	DOREPLIFETIME( AActor, bHidden );

	DOREPLIFETIME( AActor, bTearOff );
	DOREPLIFETIME( AActor, bCanBeDamaged );
	DOREPLIFETIME( AActor, AttachmentReplication );

	DOREPLIFETIME( AActor, Instigator );

	DOREPLIFETIME_CONDITION( AActor, ReplicatedMovement, COND_SimulatedOrPhysics );
}
void UAbilityTask_ApplyRootMotionMoveToActorForce::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, ForceName);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, StartLocation);
	DOREPLIFETIME_CONDITION(UAbilityTask_ApplyRootMotionMoveToActorForce, TargetLocation, COND_SimulatedOnly); // Autonomous and server calculate target location independently
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, TargetActor);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, TargetLocationOffset);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, OffsetAlignment);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, Duration);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, bDisableDestinationReachedInterrupt);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, TargetLerpSpeedHorizontalCurve);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, TargetLerpSpeedVerticalCurve);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, bSetNewMovementMode);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, NewMovementMode);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, bRestrictSpeedToExpected);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, PathOffsetCurve);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, VelocityOnFinishMode);
	DOREPLIFETIME(UAbilityTask_ApplyRootMotionMoveToActorForce, SetVelocityOnFinish);
}