private void OnServerPlayerTeleport(Player player, Vector3 targetPosition) { if (player.BoltEntity.Controller != null) { SpellPlayerTeleportEvent spellTeleportEvent = SpellPlayerTeleportEvent.Create(player.BoltEntity.Controller, ReliabilityModes.ReliableOrdered); spellTeleportEvent.TargetPosition = targetPosition; spellTeleportEvent.Send(); } }
public override void OnEvent(SpellPlayerTeleportEvent teleportEvent) { base.OnEvent(teleportEvent); if (LocalPlayer != null) { LocalPlayer.Position = teleportEvent.TargetPosition; LocalPlayer.MovementInfo.RemoveMovementFlag(MovementFlags.Ascending); } }
public override void OnEvent(SpellPlayerTeleportEvent teleportEvent) { base.OnEvent(teleportEvent); LocalPlayer?.Handle(teleportEvent); }