mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-10 16:14:45 +00:00
cleanup
This commit is contained in:
parent
804a1a826b
commit
34bb233cf5
@ -9,10 +9,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
public static PlayerTransformSync LocalInstance { get; private set; }
|
||||
|
||||
static PlayerTransformSync()
|
||||
{
|
||||
AnimControllerPatch.Init();
|
||||
}
|
||||
static PlayerTransformSync() => AnimControllerPatch.Init();
|
||||
|
||||
public override void OnStartLocalPlayer() => LocalInstance = this;
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace QSB.Utility
|
||||
|
||||
public static GameObject CreateBox(Transform parent, float vertOffset, string text)
|
||||
{
|
||||
var newBox = UnityEngine.Object.Instantiate(_boxPrefab);
|
||||
var newBox = Object.Instantiate(_boxPrefab);
|
||||
newBox.SetActive(false);
|
||||
newBox.transform.parent = parent;
|
||||
newBox.transform.localPosition = new Vector3(0, vertOffset, 0);
|
||||
|
@ -6,10 +6,7 @@ namespace QuantumUNET.Messages
|
||||
{
|
||||
public string value;
|
||||
|
||||
public QStringMessage(string v)
|
||||
{
|
||||
value = v;
|
||||
}
|
||||
public QStringMessage(string v) => value = v;
|
||||
|
||||
public override void Serialize(QNetworkWriter writer) => writer.Write(value);
|
||||
|
||||
|
@ -638,16 +638,16 @@ namespace QuantumUNET
|
||||
goto IL_2C6;
|
||||
}
|
||||
}
|
||||
Block_10:
|
||||
Block_10:
|
||||
GenerateConnectError(b);
|
||||
return;
|
||||
Block_11:
|
||||
Block_11:
|
||||
GenerateDataError(b);
|
||||
return;
|
||||
Block_17:
|
||||
Block_17:
|
||||
QLog.Log($"MaxEventsPerFrame hit ({500})");
|
||||
Block_19:
|
||||
IL_2C6:
|
||||
Block_19:
|
||||
IL_2C6:
|
||||
if (m_Connection != null && m_AsyncConnect == ConnectState.Connected)
|
||||
{
|
||||
m_Connection.FlushChannels();
|
||||
|
@ -12,10 +12,7 @@ namespace QuantumUNET
|
||||
{
|
||||
public class QNetworkConnection : IDisposable
|
||||
{
|
||||
public QNetworkConnection()
|
||||
{
|
||||
m_Writer = new QNetworkWriter();
|
||||
}
|
||||
public QNetworkConnection() => m_Writer = new QNetworkWriter();
|
||||
|
||||
internal HashSet<QNetworkIdentity> VisList { get; } = new HashSet<QNetworkIdentity>();
|
||||
|
||||
|
@ -1399,10 +1399,7 @@ namespace QuantumUNET
|
||||
|
||||
private class ServerSimpleWrapper : QNetworkServerSimple
|
||||
{
|
||||
public ServerSimpleWrapper(QNetworkServer server)
|
||||
{
|
||||
m_Server = server;
|
||||
}
|
||||
public ServerSimpleWrapper(QNetworkServer server) => m_Server = server;
|
||||
|
||||
public override void OnConnectError(int connectionId, byte error) => m_Server.GenerateConnectError(error);
|
||||
|
||||
|
@ -12,10 +12,7 @@ namespace QuantumUNET
|
||||
{
|
||||
public class QNetworkServerSimple
|
||||
{
|
||||
public QNetworkServerSimple()
|
||||
{
|
||||
connections = new ReadOnlyCollection<QNetworkConnection>(m_Connections);
|
||||
}
|
||||
public QNetworkServerSimple() => connections = new ReadOnlyCollection<QNetworkConnection>(m_Connections);
|
||||
|
||||
public int listenPort { get; set; }
|
||||
|
||||
|
@ -5,15 +5,9 @@ namespace QuantumUNET.Transport
|
||||
{
|
||||
internal class QNetBuffer
|
||||
{
|
||||
public QNetBuffer()
|
||||
{
|
||||
m_Buffer = new byte[64];
|
||||
}
|
||||
public QNetBuffer() => m_Buffer = new byte[64];
|
||||
|
||||
public QNetBuffer(byte[] buffer)
|
||||
{
|
||||
m_Buffer = buffer;
|
||||
}
|
||||
public QNetBuffer(byte[] buffer) => m_Buffer = buffer;
|
||||
|
||||
public uint Position { get; private set; }
|
||||
public int Length => m_Buffer.Length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user