Add -local flag to connect to local server
This commit is contained in:
8
main.go
8
main.go
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
|
||||
"gitea.boner.be/bdnugget/goonscape/game"
|
||||
@ -9,6 +10,13 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
local := flag.Bool("local", false, "Use local server instead of remote")
|
||||
flag.Parse()
|
||||
|
||||
if *local {
|
||||
network.SetServerAddr("localhost:6969")
|
||||
}
|
||||
|
||||
rl.InitWindow(1024, 768, "GoonScape")
|
||||
defer rl.CloseWindow()
|
||||
rl.InitAudioDevice()
|
||||
|
||||
Reference in New Issue
Block a user