Skip to content

Commit

Permalink
Fixes crash (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxEdwards20 authored Apr 2, 2024
1 parent ffeee80 commit 2bb172e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Client/Menu/GamePlayView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public override void RegisterCommands()

private bool connectToServer()
{
return MessageQueueClient.instance.initialize("localhost", 4010);
return MessageQueueClient.instance.initialize("localhost", 4000);
}

private void escape(GameTime gameTime, float scale)
Expand Down
3 changes: 2 additions & 1 deletion src/Server/MessageQueueServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public void sendMessage(int clientId, Message message, uint? messageId = null)
/// </summary>
public void sendMessageWithLastId(int clientId, Message message)
{
sendMessage(clientId, message, m_clientLastMessageId[clientId]);
var lastId = m_clientLastMessageId.ContainsKey(clientId) ? m_clientLastMessageId[clientId] : 0;
sendMessage(clientId, message, lastId);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"Server": {
"commandName": "Project",
"commandLineArgs": "--port 4010"
"commandLineArgs": "--port 4000"
}
}
}

0 comments on commit 2bb172e

Please sign in to comment.