mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
change some ints into their QMsgTypes
This commit is contained in:
parent
d16b061078
commit
ae18276fa4
@ -408,7 +408,7 @@ namespace QuantumUNET
|
||||
}
|
||||
|
||||
m_AsyncConnect = ConnectState.Connected;
|
||||
m_Connection.InvokeHandlerNoData(32);
|
||||
m_Connection.InvokeHandlerNoData(QMsgType.Connect);
|
||||
break;
|
||||
|
||||
case NetworkEventType.DisconnectEvent:
|
||||
@ -423,7 +423,7 @@ namespace QuantumUNET
|
||||
}
|
||||
|
||||
QClientScene.HandleClientDisconnect(m_Connection);
|
||||
m_Connection?.InvokeHandlerNoData(33);
|
||||
m_Connection?.InvokeHandlerNoData(QMsgType.Disconnect);
|
||||
break;
|
||||
|
||||
case NetworkEventType.Nothing:
|
||||
@ -487,8 +487,8 @@ namespace QuantumUNET
|
||||
|
||||
private void GenerateError(int error)
|
||||
{
|
||||
var handler = m_MessageHandlers.GetHandler(34)
|
||||
?? m_MessageHandlers.GetHandler(34);
|
||||
var handler = m_MessageHandlers.GetHandler(QMsgType.Error)
|
||||
?? m_MessageHandlers.GetHandler(QMsgType.Error);
|
||||
if (handler != null)
|
||||
{
|
||||
var errorMessage = new QErrorMessage
|
||||
@ -501,7 +501,7 @@ namespace QuantumUNET
|
||||
var reader = new QNetworkReader(buffer);
|
||||
handler(new QNetworkMessage
|
||||
{
|
||||
MsgType = 34,
|
||||
MsgType = QMsgType.Error,
|
||||
Reader = reader,
|
||||
Connection = m_Connection,
|
||||
ChannelId = 0
|
||||
|
Loading…
Reference in New Issue
Block a user