KF2-YetAnotherScoreboard/YAS/Classes/YAS_RepInfoPlayer.uc
GenZmeY b1635b8e28 update .editorconfig
I changed my mind a little
2023-05-02 22:15:56 +03:00

43 lines
825 B
Ucode

class YAS_RepInfoPlayer extends ReplicationInfo;
var public UniqueNetID UID;
var public Rank Rank;
var public int DamageDealt;
replication
{
if (bNetInitial)
UID;
if (bNetDirty)
Rank, DamageDealt;
}
public simulated function bool SafeDestroy()
{
return (bPendingDelete || bDeleteMe || Destroy());
}
public simulated event PreBeginPlay()
{
if (bPendingDelete || bDeleteMe) return;
Super.PreBeginPlay();
if (Role == ROLE_Authority || WorldInfo.NetMode == NM_StandAlone)
{
if (Controller(Owner) != None && Controller(Owner).PlayerReplicationInfo != None)
{
UID = Controller(Owner).PlayerReplicationInfo.UniqueID;
}
}
}
defaultproperties
{
Role = ROLE_Authority
RemoteRole = ROLE_SimulatedProxy
bAlwaysRelevant = true
bSkipActorPropertyReplication = false
}