Stuff
This commit is contained in:
2
.github/workflows/build-test.yaml
vendored
2
.github/workflows/build-test.yaml
vendored
@ -42,6 +42,6 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: RageCoop.Client
|
name: RageCoop.Client
|
||||||
path: bin/Release/Client/RageCoop
|
path: bin/Release/Client
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
@ -16,7 +16,7 @@ using System.Resources;
|
|||||||
|
|
||||||
|
|
||||||
// Version informationr(
|
// Version informationr(
|
||||||
[assembly: AssemblyVersion("1.5.4.1")]
|
[assembly: AssemblyVersion("1.5.4.3")]
|
||||||
[assembly: AssemblyFileVersion("1.5.4.1")]
|
[assembly: AssemblyFileVersion("1.5.4.3")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||||
|
|
||||||
|
@ -70,7 +70,6 @@ namespace RageCoop.Client
|
|||||||
private readonly List<Vector3> _predictedTrace = new List<Vector3>();
|
private readonly List<Vector3> _predictedTrace = new List<Vector3>();
|
||||||
private readonly List<Vector3> _orgTrace = new List<Vector3>();
|
private readonly List<Vector3> _orgTrace = new List<Vector3>();
|
||||||
private Vector3 _predictedPosition;
|
private Vector3 _predictedPosition;
|
||||||
private readonly float _elapsed;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region OUTGOING
|
#region OUTGOING
|
||||||
|
@ -240,14 +240,6 @@ namespace RageCoop.Core
|
|||||||
{
|
{
|
||||||
return Encoding.UTF8.GetBytes(s);
|
return Encoding.UTF8.GetBytes(s);
|
||||||
}
|
}
|
||||||
public static byte[] GetBytesWithLength(this string s)
|
|
||||||
{
|
|
||||||
var data = new List<byte>(100);
|
|
||||||
var sb = Encoding.UTF8.GetBytes(s);
|
|
||||||
data.AddInt(sb.Length);
|
|
||||||
data.AddRange(sb);
|
|
||||||
return data.ToArray();
|
|
||||||
}
|
|
||||||
public static string GetString(this byte[] data)
|
public static string GetString(this byte[] data)
|
||||||
{
|
{
|
||||||
return Encoding.UTF8.GetString(data);
|
return Encoding.UTF8.GetString(data);
|
||||||
|
@ -63,65 +63,6 @@ namespace RageCoop.Core
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region BYTE-LIST
|
|
||||||
public static void AddVector3(this List<byte> bytes, Vector3 vec3)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(vec3.X));
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(vec3.Y));
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(vec3.Z));
|
|
||||||
}
|
|
||||||
public static void AddQuaternion(this List<byte> bytes, Quaternion quat)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(quat.X));
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(quat.Y));
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(quat.Z));
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(quat.W));
|
|
||||||
}
|
|
||||||
public static void AddInt(this List<byte> bytes, int i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddUint(this List<byte> bytes, uint i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddShort(this List<byte> bytes, short i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddUshort(this List<byte> bytes, ushort i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddLong(this List<byte> bytes, long i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddUlong(this List<byte> bytes, ulong i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddFloat(this List<byte> bytes, float i)
|
|
||||||
{
|
|
||||||
bytes.AddRange(BitConverter.GetBytes(i));
|
|
||||||
}
|
|
||||||
public static void AddBool(this List<byte> bytes, bool b)
|
|
||||||
{
|
|
||||||
bytes.Add(b ? (byte)1 : (byte)0);
|
|
||||||
}
|
|
||||||
public static void AddString(this List<byte> bytes, string s)
|
|
||||||
{
|
|
||||||
var sb = Encoding.UTF8.GetBytes(s);
|
|
||||||
bytes.AddInt(sb.Length);
|
|
||||||
bytes.AddRange(sb);
|
|
||||||
}
|
|
||||||
public static void AddArray(this List<byte> bytes, byte[] toadd)
|
|
||||||
{
|
|
||||||
bytes.AddInt(toadd.Length);
|
|
||||||
bytes.AddRange(toadd);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
internal static bool IsSyncEvent(this PacketType p)
|
internal static bool IsSyncEvent(this PacketType p)
|
||||||
{
|
{
|
||||||
return (30 <= (byte)p) && ((byte)p <= 40);
|
return (30 <= (byte)p) && ((byte)p <= 40);
|
||||||
|
@ -15,7 +15,7 @@ using System.Resources;
|
|||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("1.5.4.0")]
|
[assembly: AssemblyVersion("1.5.4.2")]
|
||||||
[assembly: AssemblyFileVersion("1.5.4.0")]
|
[assembly: AssemblyFileVersion("1.5.4.2")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user