You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
RepGraph
- Ignore Dormancy changes for actors not added to the RepGraph yet. Their dormancy status will be checked when added as a network actor. #rb Ryan.Gerleve #rnx #ROBOMERGE-OWNER: ryan.vance #ROBOMERGE-AUTHOR: louisphilippe.seguin #ROBOMERGE-SOURCE: CL 6105046 via CL 6105183 via CL 6105526 via CL 6105538 #ROBOMERGE-BOT: DEVVR (Main -> Dev-VR) [CL 6132213 by louisphilippe seguin in Dev-VR branch]
This commit is contained in:
@@ -694,16 +694,22 @@ void UReplicationGraph::NotifyActorDormancyChange(AActor* Actor, ENetDormancy Ol
|
||||
{
|
||||
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_NotifyActorDormancyChange);
|
||||
|
||||
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
|
||||
FGlobalActorReplicationInfo* GlobalInfo = GlobalActorReplicationInfoMap.Find(Actor);
|
||||
if (!GlobalInfo)
|
||||
{
|
||||
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Ignoring change since actor is not registered yet."), *Actor->GetPathName());
|
||||
return;
|
||||
}
|
||||
|
||||
ENetDormancy CurrentDormancy = Actor->NetDormancy;
|
||||
|
||||
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Old WantsToBeDormant: %d. New WantsToBeDormant: %d"), *Actor->GetPathName(), GlobalInfo.bWantsToBeDormant, CurrentDormancy > DORM_Awake ? 1 : 0);
|
||||
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Old WantsToBeDormant: %d. New WantsToBeDormant: %d"), *Actor->GetPathName(), GlobalInfo->bWantsToBeDormant, CurrentDormancy > DORM_Awake ? 1 : 0);
|
||||
|
||||
const bool bOldWantsToBeDormant = OldDormancyState > DORM_Awake;
|
||||
const bool bNewWantsToBeDormant = CurrentDormancy > DORM_Awake;
|
||||
|
||||
GlobalInfo.bWantsToBeDormant = bNewWantsToBeDormant;
|
||||
GlobalInfo.Events.DormancyChange.Broadcast(Actor, GlobalInfo, CurrentDormancy, OldDormancyState);
|
||||
GlobalInfo->bWantsToBeDormant = bNewWantsToBeDormant;
|
||||
GlobalInfo->Events.DormancyChange.Broadcast(Actor, *GlobalInfo, CurrentDormancy, OldDormancyState);
|
||||
|
||||
// Is the actor coming out of dormancy via changing its dormancy state?
|
||||
if (!bNewWantsToBeDormant && bOldWantsToBeDormant)
|
||||
|
||||
Reference in New Issue
Block a user