Fixed gob issue
This commit is contained in:
parent
2fd97a7092
commit
e02d220026
@ -76,6 +76,7 @@ func (pt *protoTalker) sender() {
|
||||
for things := range pt.send {
|
||||
err := pt.enc.Encode(things)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
4
robot.go
4
robot.go
@ -32,7 +32,7 @@ type Robot struct {
|
||||
ProbeResult *Collision `json:"probe_result"`
|
||||
gameStats *BotStats `json:-`
|
||||
Delta float32 `json:-`
|
||||
Idg *IdGenerator
|
||||
idg *IdGenerator
|
||||
}
|
||||
|
||||
type Collision struct {
|
||||
@ -454,7 +454,7 @@ func (r *Robot) fire(g *Game) *Projectile {
|
||||
r.gameStats.Shots++
|
||||
|
||||
return &Projectile{
|
||||
Id: r.Idg.Hash(),
|
||||
Id: r.idg.Hash(),
|
||||
Position: r.Position,
|
||||
MoveTo: *r.FireAt,
|
||||
Damage: r.Stats.WeaponDamage,
|
||||
|
Loading…
Reference in New Issue
Block a user