make member a pointer for nil json

This commit is contained in:
sm
2013-09-04 00:05:38 -07:00
parent 0cc03e5768
commit 9bccf60abc
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -84,8 +84,8 @@ func (g *game) run() {
p.scan()
p.nudge()
// XXX: change to pointer, check for pointer as (0, 0) is valid target
if p.Robot.FireAt.X != 0 && p.Robot.FireAt.Y != 0 {
proj := p.fire()
if p.Robot.FireAt != nil {
proj := p.fire(g.projectiles)
if proj != nil {
g.projectiles[proj] = true
}