diff --git a/dependency/shell/run.sh b/dependency/shell/run.sh index bb10d6d1..4ac6370c 100644 --- a/dependency/shell/run.sh +++ b/dependency/shell/run.sh @@ -81,10 +81,10 @@ function retry_command { if [ "$TERMINAL" = "SERVER" ]; then map_path=$map_dir/$MAP_ID.txt if [ $EXPOSED -eq 1 ]; then - nice -10 ./Server --port 8888 --teamCount 2 --shipNum 4 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --url $SCORE_URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & + nice -10 ./Server --port 8888 --teamCount 2 --shipNum 4 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --url $SCORE_URL --token $TOKEN --fileName $playback_dir/playback --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & server_pid=$! else - nice -10 ./Server --port 8888 --teamCount 2 --shipNum 4 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --notAllowSpectator --url $SCORE_URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & + nice -10 ./Server --port 8888 --teamCount 2 --shipNum 4 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --notAllowSpectator --url $SCORE_URL --token $TOKEN --fileName $playback_dir/playback --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & server_pid=$! fi @@ -101,9 +101,9 @@ if [ "$TERMINAL" = "SERVER" ]; then if [ ! -f $playback_dir/start.lock ]; then echo "Failed to start game." touch temp.lock - mv -f temp.lock $playback_dir/video.thuaipb + mv -f temp.lock $playback_dir/playback.thuaipb kill -9 $server_pid - finish_payload='{"result": {"status": "Crashed", "scores": [0, 0]}}' + finish_payload='{"status": "Crashed", "scores": [0, 0]}' curl $FINISH_URL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d "${finish_payload}" > $playback_dir/send.log 2>&1 else echo "Game is started." diff --git a/installer/Manual.md b/installer/Manual.md index 6a54fbd9..17b12b1e 100644 --- a/installer/Manual.md +++ b/installer/Manual.md @@ -52,7 +52,7 @@ ### Playback -每次调试后会在 `%InstallPath%\logic\Server` 中生成 `114514.thuai7.pb`,在 `Playback File` 中输入 `114514.thuai7.pb`,点击 `保存` 和 `启动`。也可以对回放文件进行改名,输入对应文件名即可。 +每次调试后会在 `%InstallPath%\logic\Server` 中生成 `114514.thuaipb`,在 `Playback File` 中输入 `114514.thuaipb`,点击 `保存` 和 `启动`。也可以对回放文件进行改名,输入对应文件名即可。 ## Login diff --git a/logic/Client/ViewModel/GeneralViewModel.cs b/logic/Client/ViewModel/GeneralViewModel.cs index 22e830b9..01e7132f 100644 --- a/logic/Client/ViewModel/GeneralViewModel.cs +++ b/logic/Client/ViewModel/GeneralViewModel.cs @@ -1078,7 +1078,7 @@ Show the error message myLogger.LogInfo(String.Format("ip:{0}, port:{1}, playerid:{2}, teamid:{3}, shiptype:{4}, playbackfile:{5}, playbackspeed:{6}", ip, port, playerID, teamID, shipTypeID, playbackFile, playbackSpeed)); - //Playback("E:\\program\\Project\\THUAI7\\logic\\Client\\114514.thuai7.pb", 2.0); + //Playback("E:\\program\\Project\\THUAI7\\logic\\Client\\114514.thuaipb", 2.0); if (playbackFile.Length == 0) { try @@ -1129,7 +1129,7 @@ Show the error message // "1" //}); - //Playback("E:\\program\\Project\\THUAI7\\logic\\Server\\bin\\Debug\\net8.0\\114514.thuai7.pb", 1); + //Playback("E:\\program\\Project\\THUAI7\\logic\\Server\\bin\\Debug\\net8.0\\114514.thuaipb", 1); timerViewModel = Dispatcher.CreateTimer(); timerViewModel.Interval = TimeSpan.FromMilliseconds(50); diff --git a/playback/Playback/PlaybackConstant.cs b/playback/Playback/PlaybackConstant.cs index e514ee0c..8e997465 100755 --- a/playback/Playback/PlaybackConstant.cs +++ b/playback/Playback/PlaybackConstant.cs @@ -8,7 +8,7 @@ public static class Constants /// /// 回放文件扩展名 /// - public static readonly string FileExtension = $".thuai{Version}.pb"; + public static readonly string FileExtension = $".thuaipb"; /// /// 回放文件头 ///