public void NotifyTeleport(AttackableUnit u, float _x, float _y) { // Can't teleport to this point of the map if (!_game.Map.NavGrid.IsWalkable(_x, _y)) { _x = MovementVector.TargetXToNormalFormat(u.X); _y = MovementVector.TargetYToNormalFormat(u.Y); } else { u.setPosition(_x, _y); //TeleportRequest first(u.NetId, u.teleportToX, u.teleportToY, true); //sendPacket(currentPeer, first, Channel.CHL_S2C); _x = MovementVector.TargetXToNormalFormat(_x); _y = MovementVector.TargetYToNormalFormat(_y); } var second = new TeleportRequest(u.NetId, _x, _y, false); _game.PacketHandlerManager.broadcastPacketVision(u, second, Channel.CHL_S2C); }