0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 04:35:18 +00:00

Lycel sees everyone else 🙃

This commit is contained in:
Sanae 2022-02-16 14:36:24 -06:00
parent 18bd69338f
commit 104cb32f4b

View file

@ -35,8 +35,9 @@ timer.Elapsed += (_, _) => {
timer.Start(); timer.Start();
bool piss = false; bool piss = false;
// Guid lycel = Guid.Parse("d5feae62-2e71-1000-88fd-597ea147ae88"); Guid lycel = Guid.Parse("d5feae62-2e71-1000-88fd-597ea147ae88");
Guid lycel = Guid.Parse("5e1f9db4-1c27-1000-a421-4701972e443e"); // Guid lycel = Guid.Parse("5e1f9db4-1c27-1000-a421-4701972e443e");
Guid test = Guid.Parse("00000001-0000-0000-0000-000000000000");
server.PacketHandler = (c, p) => { server.PacketHandler = (c, p) => {
switch (p) { switch (p) {
@ -54,13 +55,23 @@ server.PacketHandler = (c, p) => {
SyncShineBag(); SyncShineBag();
break; break;
} }
case PlayerPacket playerPacket: { case PlayerPacket playerPacket when c.Id == lycel && c.Id != test && piss: {
if (!piss || c.Id != lycel) break;
playerPacket.Position += Vector3.UnitY * 160; playerPacket.Position += Vector3.UnitY * 160;
playerPacket.Rotation *= Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationX(MathF.PI)); playerPacket.Rotation *= Quaternion.CreateFromRotationMatrix(Matrix4x4.CreateRotationX(MathF.PI));
server.Broadcast(playerPacket, c); server.Broadcast(playerPacket, c);
return false; return false;
} }
case PlayerPacket playerPacket when c.Id != lycel && piss: {
server.BroadcastReplace(playerPacket, c, (from, to, sp) => {
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);
});
return false;
}
} }
return true; return true;