public void Start() { ConditionalConfiguration conditionalConfiguration = Service.Get <ConditionalConfiguration>(); Model.LodLevel = conditionalConfiguration.Get("AvatarSystem.LODLevel.property", 0); ZoneLocalPlayerManager zoneLocalPlayerManager = SceneRefs.ZoneLocalPlayerManager; isLocal = zoneLocalPlayerManager.LocalPlayerGameObject == base.gameObject; if (isLocal ? CombineLocal : CombineRemote) { base.gameObject.SetActive(value: false); AvatarViewCombined avatarViewCombined = base.gameObject.AddComponent <AvatarViewCombined>(); avatarViewCombined.UseGpuSkinning = UseGpuSkinning; avatarViewCombined.MaxAtlasDimension = conditionalConfiguration.Get("AvatarSystem.MaxAtlasDimension.property", 512); base.gameObject.SetActive(value: true); avatarView = avatarViewCombined; } else { avatarView = base.gameObject.AddComponent <AvatarViewDistinct>(); } if (isLocal) { zoneLocalPlayerManager.AssignAvatarView(avatarView); } base.gameObject.AddComponent <PlayerMediator>(); avatarView.OnBusy += avatarView_OnBusy; avatarView.OnReady += avatarView_OnReady; bool flag = true; if (AvatarDataHandle.TryGetPlayerHandle(base.gameObject, out var handle) && dataEntityCollection.TryGetComponent <AvatarDetailsData>(handle, out avatarDetailsData)) { processAvatarDetails(handle); flag = false; } if (flag) { dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <AvatarDetailsData> >(onAvatarDetailsAdded); Model.ClearAllEquipment(); } }
public static void SetZoneLocalPlayerManager(ZoneLocalPlayerManager zoneLocalPlayerManager) { ZoneLocalPlayerManager = zoneLocalPlayerManager; }