Fixed gob issue

This commit is contained in:
Stephen McQuay 2014-03-29 01:51:40 -07:00
parent 2fd97a7092
commit e02d220026
2 changed files with 3 additions and 2 deletions

View File

@ -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
}
}

View File

@ -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,