float32 -> float64

This commit is contained in:
sm
2014-04-26 15:36:04 -07:00
parent db28bfea11
commit 8f7ef5aa1a
8 changed files with 83 additions and 82 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ type Projectile struct {
Position v.Point2d `json:"position"`
MoveTo v.Point2d `json:"-"`
Radius int `json:"-"`
Speed float32 `json:"-"`
Speed float64 `json:"-"`
Damage int `json:"-"`
Owner *Robot `json:"-"`
Delta float32
Delta float64
}
// Projectile.Tick is called every game tick and moves projectiles along,
@@ -98,7 +98,7 @@ func (p *Projectile) Tick(g *Game) {
for player := range g.players {
for _, r := range player.Robots {
dist := v.Distance(r.Position, p.Position)
if dist < float32(p.Radius) {
if dist < float64(p.Radius) {
if r.Health > 0 {
r.Health -= p.Damage
r.Hit = true