1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

Drop webpack

This commit is contained in:
Dean Herbert 2020-10-22 17:29:43 +09:00
parent 05697dfe68
commit 0611b30258
3 changed files with 9 additions and 7 deletions

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR.Client; using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -75,7 +76,7 @@ namespace osu.Game.Online.Spectator
{ {
options.Headers.Add("Authorization", $"Bearer {api.AccessToken}"); options.Headers.Add("Authorization", $"Bearer {api.AccessToken}");
}) })
.AddMessagePackProtocol() .AddNewtonsoftJsonProtocol(options => { options.PayloadSerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; })
.Build(); .Build();
// until strong typed client support is added, each method must be manually bound (see https://github.com/dotnet/aspnetcore/issues/15198) // until strong typed client support is added, each method must be manually bound (see https://github.com/dotnet/aspnetcore/issues/15198)
@ -147,11 +148,15 @@ namespace osu.Game.Online.Spectator
return Task.CompletedTask; return Task.CompletedTask;
} }
public void BeginPlaying(int beatmapId) public void BeginPlaying()
{ {
if (!isConnected) return; if (!isConnected) return;
connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), beatmapId); // transfer state at point of beginning play
currentState.BeatmapID = beatmap.Value.BeatmapInfo.OnlineBeatmapID;
currentState.Mods = mods.Value.ToArray();
connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), currentState);
} }
public void SendFrames(FrameDataBundle data) public void SendFrames(FrameDataBundle data)

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using MessagePack;
using osu.Game.Rulesets.Replays; using osu.Game.Rulesets.Replays;
using osuTK; using osuTK;
@ -9,7 +8,6 @@ namespace osu.Game.Replays.Legacy
{ {
public class LegacyReplayFrame : ReplayFrame public class LegacyReplayFrame : ReplayFrame
{ {
[IgnoreMember]
public Vector2 Position => new Vector2(MouseX ?? 0, MouseY ?? 0); public Vector2 Position => new Vector2(MouseX ?? 0, MouseY ?? 0);
public float? MouseX; public float? MouseX;

View File

@ -21,9 +21,8 @@
<PackageReference Include="Dapper" Version="2.0.35" /> <PackageReference Include="Dapper" Version="2.0.35" />
<PackageReference Include="DiffPlex" Version="1.6.3" /> <PackageReference Include="DiffPlex" Version="1.6.3" />
<PackageReference Include="Humanizer" Version="2.8.26" /> <PackageReference Include="Humanizer" Version="2.8.26" />
<PackageReference Include="MessagePack" Version="1.7.3.7" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.9" /> <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.9" /> <PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />