Reintroduce ProtoBuf and use it for inventory caching too. ZeroFormatter wasn't working out.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,6 +27,7 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
@@ -34,15 +36,20 @@ namespace OpenMetaverse
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[ProtoContract]
|
||||
public struct Color4 : IComparable<Color4>, IEquatable<Color4>
|
||||
{
|
||||
/// <summary>Red</summary>
|
||||
[ProtoMember(1)]
|
||||
public float R;
|
||||
/// <summary>Green</summary>
|
||||
[ProtoMember(2)]
|
||||
public float G;
|
||||
/// <summary>Blue</summary>
|
||||
[ProtoMember(3)]
|
||||
public float B;
|
||||
/// <summary>Alpha</summary>
|
||||
[ProtoMember(4)]
|
||||
public float A;
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="protobuf-net" Version="3.0.101" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,23 +28,29 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
[Serializable]
|
||||
[ProtoContract]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Quaternion : IEquatable<Quaternion>
|
||||
{
|
||||
/// <summary>X value</summary>
|
||||
[ProtoMember(1)]
|
||||
public float X;
|
||||
|
||||
/// <summary>Y value</summary>
|
||||
[ProtoMember(2)]
|
||||
public float Y;
|
||||
|
||||
/// <summary>Z value</summary>
|
||||
[ProtoMember(3)]
|
||||
public float Z;
|
||||
|
||||
/// <summary>W value</summary>
|
||||
[ProtoMember(4)]
|
||||
public float W;
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,6 +27,7 @@
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
@@ -34,9 +36,11 @@ namespace OpenMetaverse
|
||||
/// Life networking protocol
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[ProtoContract]
|
||||
public struct UUID : IComparable<UUID>, IEquatable<UUID>
|
||||
{
|
||||
/// <summary>The System.Guid object this struct wraps around</summary>
|
||||
[ProtoMember(1)]
|
||||
public Guid Guid { get; set; }
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,6 +28,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
@@ -35,11 +37,14 @@ namespace OpenMetaverse
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[ProtoContract]
|
||||
public struct Vector2 : IComparable<Vector2>, IEquatable<Vector2>
|
||||
{
|
||||
/// <summary>X value</summary>
|
||||
[ProtoMember(1)]
|
||||
public float X;
|
||||
/// <summary>Y value</summary>
|
||||
[ProtoMember(2)]
|
||||
public float Y;
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,6 +28,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
@@ -35,15 +37,19 @@ namespace OpenMetaverse
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[ProtoContract]
|
||||
public struct Vector3 : IComparable<Vector3>, IEquatable<Vector3>
|
||||
{
|
||||
/// <summary>X value</summary>
|
||||
[ProtoMember(1)]
|
||||
public float X;
|
||||
|
||||
/// <summary>Y value</summary>
|
||||
[ProtoMember(2)]
|
||||
public float Y;
|
||||
|
||||
/// <summary>Z value</summary>
|
||||
[ProtoMember(3)]
|
||||
public float Z;
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,6 +28,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
@@ -35,13 +37,17 @@ namespace OpenMetaverse
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[ProtoContract]
|
||||
public struct Vector3d : IComparable<Vector3d>, IEquatable<Vector3d>
|
||||
{
|
||||
/// <summary>X value</summary>
|
||||
[ProtoMember(1)]
|
||||
public double X;
|
||||
/// <summary>Y value</summary>
|
||||
[ProtoMember(2)]
|
||||
public double Y;
|
||||
/// <summary>Z value</summary>
|
||||
[ProtoMember(3)]
|
||||
public double Z;
|
||||
|
||||
#region Constructors
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2021, Sjofn LLC.
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,20 +28,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Globalization;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace OpenMetaverse
|
||||
{
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[ProtoContract]
|
||||
public struct Vector4 : IComparable<Vector4>, IEquatable<Vector4>
|
||||
{
|
||||
/// <summary>X value</summary>
|
||||
[ProtoMember(1)]
|
||||
public float X;
|
||||
/// <summary>Y value</summary>
|
||||
[ProtoMember(2)]
|
||||
public float Y;
|
||||
/// <summary>Z value</summary>
|
||||
[ProtoMember(3)]
|
||||
public float Z;
|
||||
/// <summary>W value</summary>
|
||||
[ProtoMember(4)]
|
||||
public float W;
|
||||
|
||||
#region Constructors
|
||||
|
||||
Reference in New Issue
Block a user