rewrite of the stats system
This commit is contained in:
@@ -234,6 +234,7 @@ func addPlayer(ws *websocket.Conn) {
|
||||
Robots: []*Robot{},
|
||||
send: make(chan Message),
|
||||
ws: ws,
|
||||
Id: idg.Hash(),
|
||||
}
|
||||
|
||||
for name, stats := range conf.Stats {
|
||||
@@ -251,6 +252,7 @@ func addPlayer(ws *websocket.Conn) {
|
||||
}
|
||||
|
||||
game.register <- p
|
||||
|
||||
defer func() {
|
||||
game.unregister <- p
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user