cleaned up some logging
This commit is contained in:
+8
-3
@@ -204,7 +204,7 @@ func addPlayer(ws *websocket.Conn) {
|
||||
for {
|
||||
log.Printf("%s Waiting for client to send conf ...", player_id)
|
||||
err = websocket.JSON.Receive(ws, &conf)
|
||||
log.Printf("conf received: %+v", conf)
|
||||
log.Printf("%s: conf received: %+v", player_id, conf)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("%s %s config parse error", gid.Id, player_id)
|
||||
@@ -239,7 +239,7 @@ func addPlayer(ws *websocket.Conn) {
|
||||
Heading: v.Vector2d{1, 0},
|
||||
Scanners: make([]Scanner, 0)}
|
||||
r.Health = r.Stats.Hp
|
||||
log.Printf("Adding Robot: %+v", r)
|
||||
log.Printf("%s: adding robot: %s", p.Id, r.Id)
|
||||
r.reset(game)
|
||||
p.Robots = append(p.Robots, &r)
|
||||
}
|
||||
@@ -251,7 +251,12 @@ func addPlayer(ws *websocket.Conn) {
|
||||
}()
|
||||
go p.sender()
|
||||
p.recv()
|
||||
log.Printf("game %s: player %v has been disconnected from this game\n", gid.Id, p.Robots[0].Id)
|
||||
log.Printf(
|
||||
"%s (player): %v (robot) has been disconnected from %s (game)",
|
||||
p.Id,
|
||||
p.Robots[0].Id,
|
||||
gid.Id,
|
||||
)
|
||||
case "spectator":
|
||||
s := &Spectator{
|
||||
send: make(chan Message),
|
||||
|
||||
Reference in New Issue
Block a user