self shots are still suicides
This commit is contained in:
parent
7bb5ae59b3
commit
dce3f15c4c
@ -100,11 +100,15 @@ func (p *Projectile) Tick(g *game) {
|
|||||||
p.Owner.gameStats.Hits++
|
p.Owner.gameStats.Hits++
|
||||||
if r.Health <= 0 {
|
if r.Health <= 0 {
|
||||||
r.gameStats.Deaths++
|
r.gameStats.Deaths++
|
||||||
|
if r == p.Owner {
|
||||||
|
p.Owner.gameStats.Suicides++
|
||||||
|
} else {
|
||||||
p.Owner.gameStats.Kills++
|
p.Owner.gameStats.Kills++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
p.Position.X = newPos.X
|
p.Position.X = newPos.X
|
||||||
p.Position.Y = newPos.Y
|
p.Position.Y = newPos.Y
|
||||||
|
Loading…
Reference in New Issue
Block a user