Skip to content

Commit

Permalink
修复了无法添加player的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoWQ222 committed Mar 16, 2024
1 parent ae7b575 commit 19279da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions logic/Server/GameServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private uint GetBirthPointIdx(long playerID) // 获取出生点位置

private bool ValidPlayerID(long playerID)
{
if (playerID==0 || (1 <= playerID && playerID <= options.ShipCount))
if (playerID == 0 || (1 <= playerID && playerID <= options.MaxShipCount))
return true;
return false;
}
Expand Down Expand Up @@ -307,7 +307,7 @@ public GameServer(ArgumentOptions options)
//创建server时先设定待加入对象都是invalid
for (int team = 0; team < TeamCount; team++)
{
communicationToGameID[team][0]= GameObj.invalidID; // team
communicationToGameID[team][0] = GameObj.invalidID; // team
for (int i = 1; i <= options.MaxShipCount; i++)
{
communicationToGameID[team][i] = GameObj.invalidID; //sweeper
Expand Down
2 changes: 1 addition & 1 deletion logic/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 8888 --teamCount 1 --homeNum 0 --MaxShipNum 1"
"commandLineArgs": "--port 8888 --teamCount 1 --homeNum 1 --MaxShipNum 1"
}
}
}

0 comments on commit 19279da

Please sign in to comment.