Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Commit

Permalink
Client收到错误格式的消息时不致于退出,而是继续运行
Browse files Browse the repository at this point in the history
  • Loading branch information
junbao-zhou committed Apr 23, 2020
1 parent 1c482be commit efec417
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions logic/Logic.Client/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ public void OnReceive(IMessage message)
messageToServer.ID = this.id;
}

this.Position = new XYPosition(msg.GameObjectList[this.id].PositionX, msg.GameObjectList[this.id].PositionY);
this._facingDirection = (THUnity2D.Direction)msg.GameObjectList[this.id].Direction;
//this.Position = new XYPosition(msg.GameObjectList[this.id].PositionX, msg.GameObjectList[this.id].PositionY);
//this._facingDirection = (THUnity2D.Direction)msg.GameObjectList[this.id].Direction;

ChangeAllLabels(msg);
lastRecieveMessage = msg;
Expand Down
2 changes: 1 addition & 1 deletion runAgent.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
communication\Agent\bin\Release\netcoreapp3.0\Communication.Agent.exe --server 127.0.0.1:20000 --port 30000 --debugLevel 0 --playercount 1 --timelimit 25
communication\Agent\bin\Release\netcoreapp3.0\Communication.Agent.exe --server 127.0.0.1:20000 --port 30000 --debugLevel 0 --playercount 2 --timelimit 25
2 changes: 1 addition & 1 deletion runServer.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
logic\Logic.Server\bin\Release\netcoreapp3.0\Logic.Server.exe --port 20000 --debugLevel 1 --playerCount 1 --agentCount 2 --gameTime 600
logic\Logic.Server\bin\Release\netcoreapp3.0\Logic.Server.exe --port 20000 --debugLevel 1 --playerCount 2 --agentCount 4 --gameTime 600

0 comments on commit efec417

Please sign in to comment.