コード例 #1
0
 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();
     }
 }
コード例 #2
0
        public override void OnEvent(SpellPlayerTeleportEvent teleportEvent)
        {
            base.OnEvent(teleportEvent);

            if (LocalPlayer != null)
            {
                LocalPlayer.Position = teleportEvent.TargetPosition;
                LocalPlayer.MovementInfo.RemoveMovementFlag(MovementFlags.Ascending);
            }
        }
コード例 #3
0
        public override void OnEvent(SpellPlayerTeleportEvent teleportEvent)
        {
            base.OnEvent(teleportEvent);

            LocalPlayer?.Handle(teleportEvent);
        }