Add log packet and don't spam

This commit is contained in:
Sanae 2022-02-16 15:00:52 -06:00
parent 104cb32f4b
commit 860f5c242b
2 changed files with 15 additions and 2 deletions

View File

@ -57,7 +57,7 @@ server.PacketHandler = (c, p) => {
}
case PlayerPacket playerPacket when c.Id == lycel && c.Id != test && piss: {
playerPacket.Position += Vector3.UnitY * 160;
playerPacket.Rotation *= Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationX(MathF.PI));
playerPacket.Rotation *= Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationX(MathF.PI)) * Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationY(MathF.PI));
server.Broadcast(playerPacket, c);
return false;
}
@ -66,7 +66,6 @@ server.PacketHandler = (c, p) => {
if (to.Id == lycel) {
sp.Position += Vector3.UnitY * 160;
sp.Rotation *= Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationX(MathF.PI)) * Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationY(MathF.PI));
Console.WriteLine($"piss and not lycel {to.Id}");
}
to.Send(sp, from);
});

View File

@ -0,0 +1,14 @@
using System.Text;
namespace Shared.Packet.Packets;
public struct LogPacket : IPacket {
public string Text;
public void Serialize(Span<byte> data) {
}
public void Deserialize(Span<byte> data) {
Text = Encoding.UTF8.GetString(data[..]).TrimNullTerm();
}
}