Browse Source

Merge pull request #184 from Shawqeem/dev

fix: 🐛 fix the bug of command line
tags/0.1.0
TCL GitHub 2 years ago
parent
commit
b6c6a7d4f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 11 deletions
  1. +0
    -6
      logic/Server/GameServer.cs
  2. +1
    -1
      logic/Server/Properties/launchSettings.json
  3. +0
    -4
      logic/cmd/gameServer.cmd

+ 0
- 6
logic/Server/GameServer.cs View File

@@ -20,12 +20,7 @@ namespace Server
protected readonly ArgumentOptions options;
private HttpSender? httpSender;
private object gameLock = new();
<<<<<<< HEAD
private int playerNum = 0;
private int PlayerNum => playerNum; // 注意修改
=======
public int PlayerNum => options.playerNum; // 注意修改
>>>>>>> 9497283ae5076d61510347911d4d9ac16841cef3
private MessageToClient currentGameInfo = new();
private MessageOfObj currentMapMsg = new();
private object newsLock = new();
@@ -569,7 +564,6 @@ namespace Server
public GameServer(ArgumentOptions options)
{
this.options = options;
this.playerNum = options.playerNum;
//if (options.mapResource == DefaultArgumentOptions.MapResource)
// this.game = new Game(MapInfo.defaultMap, options.TeamCount);
//else


+ 1
- 1
logic/Server/Properties/launchSettings.json View File

@@ -2,7 +2,7 @@
"profiles": {
"Server": {
"commandName": "Project",
"commandLineArgs": "--ip 0.0.0.0\r\n-p 8888\r\n-f playback\r\n-g 600\r\n-b true\r\n-c 4\r\n-t 2\r\n-n 1"
"commandLineArgs": "--ip 0.0.0.0 -p 8888 "
}
}
}

+ 0
- 4
logic/cmd/gameServer.cmd View File

@@ -1,10 +1,6 @@
@echo off

<<<<<<< HEAD
start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --port 8888 --teamCount 2 --playerNum 2 --gameTimeInSecond 600 --fileName test
=======
start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --port 8888 --teamCount 2 --playerCount 4 --playerNum 1 --gameTimeInSecond 600 --fileName test
>>>>>>> 9497283ae5076d61510347911d4d9ac16841cef3

ping -n 2 127.0.0.1 > NUL



Loading…
Cancel
Save