minor tweak to projectile scanning
This commit is contained in:
parent
eabc1ebb41
commit
b01654ec76
@ -190,6 +190,7 @@ func (p *player) Tick(g *game) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We only self repair when we're stopped
|
||||||
if math.Abs(float64(p.Robot.Speed)) < v.Epsilon && p.Robot.RepairCounter > 0 {
|
if math.Abs(float64(p.Robot.Speed)) < v.Epsilon && p.Robot.RepairCounter > 0 {
|
||||||
p.Robot.RepairCounter -= delta
|
p.Robot.RepairCounter -= delta
|
||||||
if p.Robot.RepairCounter < 0 {
|
if p.Robot.RepairCounter < 0 {
|
||||||
@ -231,7 +232,7 @@ func (p *player) scan(g *game) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for proj, _ := range g.projectiles {
|
for proj, _ := range g.projectiles {
|
||||||
if proj.Owner.Robot.Id == p.Robot.Id {
|
if proj.Owner == p {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user