Add -local flag to connect to local server

This commit is contained in:
2025-01-18 14:23:48 +01:00
parent 0cd3145d28
commit e8d062c4b7
4 changed files with 16 additions and 4 deletions

View File

@ -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()