use lidgren's new spans (#1164)

update solution
This commit is contained in:
Tyler Young
2020-06-24 11:57:59 -04:00
committed by GitHub
parent ca1fb126e7
commit 623e47f19d
3 changed files with 12 additions and 10 deletions

View File

@@ -26,7 +26,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="GameObjects\Components\Construction\" />
<Folder Include="GameObjects\Components\Trigger\" />
<EmbeddedResource Include="Text\Names\*.txt" />
<Folder Include="GameObjects\Components\Visualizers" />

View File

@@ -30,14 +30,13 @@ namespace Content.Shared.Preferences
{
var serializer = IoCManager.Resolve<IRobustSerializer>();
var length = buffer.ReadInt32();
var bytes = buffer.ReadBytes(length);
using (var stream = new MemoryStream(bytes))
using (var stream = buffer.ReadAsStream(length))
{
Preferences = serializer.Deserialize<PlayerPreferences>(stream);
}
length = buffer.ReadInt32();
bytes = buffer.ReadBytes(length);
using (var stream = new MemoryStream(bytes))
using (var stream = buffer.ReadAsStream(length))
{
Settings = serializer.Deserialize<GameSettings>(stream);
}
@@ -110,11 +109,8 @@ namespace Content.Shared.Preferences
Slot = buffer.ReadInt32();
var serializer = IoCManager.Resolve<IRobustSerializer>();
var length = buffer.ReadInt32();
var bytes = buffer.ReadBytes(length);
using (var stream = new MemoryStream(bytes))
{
Profile = serializer.Deserialize<ICharacterProfile>(stream);
}
using var stream = buffer.ReadAsStream(length);
Profile = serializer.Deserialize<ICharacterProfile>(stream);
}
public override void WriteToBuffer(NetOutgoingMessage buffer)

View File

@@ -69,6 +69,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{DDD55F86
RobustToolbox\Tools\download_natives.py = RobustToolbox\Tools\download_natives.py
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.UnitTests", "RobustToolbox\Lidgren.Network.UnitTests\Lidgren.Network.UnitTests.csproj", "{682E3140-4F27-4ECB-8029-D436319DDC48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -137,6 +139,10 @@ Global
{F0ADA779-40B8-4F7E-BA6C-CDB19F3065D9}.Release|Any CPU.Build.0 = Release|Any CPU
{F0ADA779-40B8-4F7E-BA6C-CDB19F3065D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0ADA779-40B8-4F7E-BA6C-CDB19F3065D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{682E3140-4F27-4ECB-8029-D436319DDC48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{682E3140-4F27-4ECB-8029-D436319DDC48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{682E3140-4F27-4ECB-8029-D436319DDC48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{682E3140-4F27-4ECB-8029-D436319DDC48}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -153,6 +159,7 @@ Global
{50404922-9637-4394-BF59-165D0850ADC8} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{41B450C0-A361-4CD7-8121-7072B8995CFC} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{DDD55F86-0406-42E5-8443-93EDC6BB2D75} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{682E3140-4F27-4ECB-8029-D436319DDC48} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AA37ED9F-F8D6-468E-A101-658AD605B09A}