Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 StreamServer/Source/StreamServer/StatusCheckLoop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public StatusCheckLoop(int interval, ulong id, InputLoop inputLoop, OutputLoop o
this.outputLoop = outputLoop;
}

#pragma warning disable CS1998
protected override async Task Update(int count)
{
Printer.PrintDbg($"Num clients: {ModelManager.Instance.Users.Count.ToString()}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Runtime.Serialization;

#nullable enable
namespace CommonLibrary.Exception
{ [Serializable]

Expand Down
9 changes: 7 additions & 2 deletions 9 StreamServerCommonLibrary/MinimumAvatarPacket.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

namespace CommonLibrary
{
Expand Down Expand Up @@ -43,7 +43,7 @@ public MinimumAvatarPacket(ulong paketId, Vector3 position, int radY, Vector4 ne
this.time = time;
}


/// <summary>
/// Rangeが決まっているものについてチェックする
/// </summary>
Expand All @@ -57,5 +57,10 @@ public bool CheckRange()
var neckW = this.NeckRotation.w;
return Math.Abs(radY) < 128 && Math.Abs(neckX) < 128 && Math.Abs(neckY) < 128 && Math.Abs(neckZ) < 128 && Math.Abs(neckW) < 128;
}

public override string ToString()
{
return $"{{ Id={PaketId}, Pos={{{Position.x}, {Position.y}, {Position.z}}}, RadY={RadY}, Time={time}, Neck={{{NeckRotation.x}, {NeckRotation.y}, {NeckRotation.z}, {NeckRotation.w}}} }}";
}
}
}
20 changes: 10 additions & 10 deletions 20 StreamServerCommonLibrary/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public static MinimumAvatarPacket BufferToPacket(byte[] buf)
var y = BitConverter.ToInt16(buf, offset += sizeof(short));
var z = BitConverter.ToInt16(buf, offset += sizeof(short));
offset += sizeof(short);
var radY = PacketUtil.ConvertInt(buf[offset]);
var qx = PacketUtil.ConvertInt(buf[offset + 1]);
var qy = PacketUtil.ConvertInt(buf[offset + 2]);
var qz = PacketUtil.ConvertInt(buf[offset + 3]);
var qw = PacketUtil.ConvertInt(buf[offset + 4]);
var radY = (sbyte)buf[offset];
var qx = (sbyte)buf[offset + 1];
var qy = (sbyte)buf[offset + 2];
var qz = (sbyte)buf[offset + 3];
var qw = (sbyte)buf[offset + 4];
var time = BitConverter.ToDouble(buf, offset + 5);
MinimumAvatarPacket packet =
new MinimumAvatarPacket(userId, new Vector3(x, y, z), radY,
Expand Down Expand Up @@ -66,11 +66,11 @@ public static List<MinimumAvatarPacket> BufferToPackets(byte[] buf)
var y = BitConverter.ToInt16(buf, offset += sizeof(short));
var z = BitConverter.ToInt16(buf, offset += sizeof(short));
offset += sizeof(short);
var radY = PacketUtil.ConvertInt(buf[offset]);
var qx = PacketUtil.ConvertInt(buf[offset + 1]);
var qy = PacketUtil.ConvertInt(buf[offset + 2]);
var qz = PacketUtil.ConvertInt(buf[offset + 3]);
var qw = PacketUtil.ConvertInt(buf[offset + 4]);
var radY = (sbyte)buf[offset];
var qx = (sbyte)buf[offset + 1];
var qy = (sbyte)buf[offset + 2];
var qz = (sbyte)buf[offset + 3];
var qw = (sbyte)buf[offset + 4];
var time = BitConverter.ToDouble(buf, offset + 5);
MinimumAvatarPacket packet = new MinimumAvatarPacket(userId, new Vector3(x, y, z),
radY,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.