Skip to content

Commit f9694bb

Browse files
committed
made --latency-ms optional as it was removed in 0.14
1 parent 9573413 commit f9694bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"log"
66
"os"
77
"os/exec"
8+
"path/filepath"
89
"strconv"
910
"syscall"
10-
"path/filepath"
1111
)
1212

1313
type FactorioServer struct {
@@ -55,7 +55,6 @@ func (f *FactorioServer) Run() error {
5555
var err error
5656

5757
args := []string{"--start-server", filepath.Join(config.FactorioSavesDir, f.Savefile),
58-
"--latency-ms", strconv.Itoa(f.Latency),
5958
"--autosave-interval", strconv.Itoa(f.AutosaveInterval),
6059
"--autosave-slots", strconv.Itoa(f.AutosaveSlots),
6160
"--port", strconv.Itoa(f.Port)}
@@ -68,6 +67,9 @@ func (f *FactorioServer) Run() error {
6867
if f.AutoPause {
6968
args = append(args, "--no-auto-pause")
7069
}
70+
if f.Latency != 100 {
71+
args = append(args, "--latency-ms", strconv.Itoa(f.Latency))
72+
}
7173

7274
log.Println("Starting server with command: ", config.FactorioBinary, args)
7375

0 commit comments

Comments
 (0)