final start/reset touches
This commit is contained in:
10
ttd.go
10
ttd.go
@@ -54,7 +54,6 @@ type ServerDataTTD struct {
|
||||
LastClientCompute time.Time
|
||||
Conn net.Conn
|
||||
Stop chan struct{}
|
||||
Started bool
|
||||
}
|
||||
|
||||
var updateHeartBeat = 5 * time.Second
|
||||
@@ -594,15 +593,6 @@ func (s *ServerTTD) ComputeClientTime() {
|
||||
t := time.Now()
|
||||
if !cfg.Game.Started {
|
||||
s.Data.LastClientCompute = t
|
||||
s.Data.Started = false
|
||||
return
|
||||
}
|
||||
if !s.Data.Started {
|
||||
for _, cc := range cfg.Clients {
|
||||
cc.TimeLeft = cfg.Game.StartingAllotment
|
||||
}
|
||||
bot.SendChat(cfg.Telegram.ChatID, "Starting allotment credited.")
|
||||
s.Data.Started = true
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user