Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ebiten-game/game/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@
if err != nil {
panic(err)
}
if response.StatusCode != http.StatusOK {
g.writeLog("Failed to join lobby, probably doesn't exist.\n")
return

Check failure on line 415 in ebiten-game/game/main.go

View workflow job for this annotation

GitHub Actions / lint / Go

return with no blank line before (nlreturn)
}
var pData playerData
err = json.NewDecoder(response.Body).Decode(&pData)
if err != nil {
Expand Down
8 changes: 5 additions & 3 deletions ebiten-game/game/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ func (g *game) logWindow(ctx *debugui.Context) {
ctx.Button("Host Game").On(func() {
submitOpen()
})
ctx.Button("Join").On(func() {
submitJoin()
})
if !g.isHost {
ctx.Button("Join").On(func() {
submitJoin()
})
}
})
})
}
Loading