diff --git a/player.go b/player.go index 0df0208..bde3dd5 100644 --- a/player.go +++ b/player.go @@ -85,13 +85,13 @@ func (p *player) recv() { } else { r.TargetSpeed = r.Stats.Speed } + } - if msg.Probe != nil { - r.Probe = msg.Probe - r.ProbeResult = nil - } else { - r.Probe = nil - } + if msg.Probe != nil { + r.Probe = msg.Probe + r.ProbeResult = nil + } else { + r.Probe = nil } if msg.Message != nil { diff --git a/robot.go b/robot.go index 10c8b83..81a9fa4 100644 --- a/robot.go +++ b/robot.go @@ -272,7 +272,7 @@ func (r *Robot) Tick(g *game) { if dmg <= 0 { // All collisions need to do at least a little damage, // otherwise robots could get stuck and never die - dmg = 2 + dmg = 1 } r.Collision = true @@ -283,8 +283,7 @@ func (r *Robot) Tick(g *game) { } if r.Position != intersection_point { - move_by := intersection_point.Sub(r.Position) - r.Position = r.Position.Add(move_by) + r.Position = intersection_point } r.Health -= dmg