allow probes while repairing and scanning

This commit is contained in:
Fraser Graham 2013-11-27 20:33:57 -08:00
parent ffbd656bc7
commit 33aea792ed
2 changed files with 8 additions and 9 deletions

View File

@ -85,13 +85,13 @@ func (p *player) recv() {
} else { } else {
r.TargetSpeed = r.Stats.Speed r.TargetSpeed = r.Stats.Speed
} }
}
if msg.Probe != nil { if msg.Probe != nil {
r.Probe = msg.Probe r.Probe = msg.Probe
r.ProbeResult = nil r.ProbeResult = nil
} else { } else {
r.Probe = nil r.Probe = nil
}
} }
if msg.Message != nil { if msg.Message != nil {

View File

@ -272,7 +272,7 @@ func (r *Robot) Tick(g *game) {
if dmg <= 0 { if dmg <= 0 {
// All collisions need to do at least a little damage, // All collisions need to do at least a little damage,
// otherwise robots could get stuck and never die // otherwise robots could get stuck and never die
dmg = 2 dmg = 1
} }
r.Collision = true r.Collision = true
@ -283,8 +283,7 @@ func (r *Robot) Tick(g *game) {
} }
if r.Position != intersection_point { if r.Position != intersection_point {
move_by := intersection_point.Sub(r.Position) r.Position = intersection_point
r.Position = r.Position.Add(move_by)
} }
r.Health -= dmg r.Health -= dmg