protected static bool GetOrigin(uLink.NetworkPlayer player, bool eyes, out Vector3 origin) { PlayerClient playerClient; Transform transforms; ServerManagement serverManagement = ServerManagement.Get(); if (serverManagement && serverManagement.GetPlayerClient(player, out playerClient)) { Controllable controllable = playerClient.controllable; if (controllable) { Character component = controllable.GetComponent <Character>(); if (!component) { transforms = controllable.transform; } else { transforms = (!eyes || !component.eyesTransformReadOnly ? component.transform : component.eyesTransformReadOnly); } origin = transforms.position; return(true); } } origin = new Vector3(); return(false); }
private ActivationResult ActRoute(bool?on, uLink.NetworkPlayer sender, ulong timestamp) { PlayerClient playerClient; ServerManagement serverManagement = ServerManagement.Get(); if (!serverManagement) { playerClient = null; } else { serverManagement.GetPlayerClient(sender, out playerClient); } return(this.ActRoute(on, playerClient, timestamp)); }
private ActivationResult ActRoute(bool?on, NetworkPlayer sender, ulong timestamp) { PlayerClient client; ServerManagement management = ServerManagement.Get(); if (management != null) { management.GetPlayerClient(sender, out client); } else { client = null; } return(this.ActRoute(on, client, timestamp)); }