Skip to content

Commit

Permalink
[game] rename resolved slice to solved
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Feb 23, 2015
1 parent 91a74fd commit dcf53c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game/sim.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type narrowPhase struct {
actorIndex actorIndex

// Reset at the beginning of every ResolveCollisions call
resolved []quad.Collision
solved []quad.Collision
// Generated at the beginning of every ResolveCollisions call
collisionIndex quad.CollisionIndex
}
Expand Down Expand Up @@ -109,7 +109,7 @@ func (phase inputPhase) ApplyInputsTo(e entity.Entity, now stime.Time) []entity.
}

func (phase narrowPhase) hasSolved(c quad.Collision) bool {
for _, solved := range phase.resolved {
for _, solved := range phase.solved {
if c.IsSameAs(solved) {
return true
}
Expand All @@ -120,7 +120,7 @@ func (phase narrowPhase) hasSolved(c quad.Collision) bool {

func (phase narrowPhase) ResolveCollisions(cg *quad.CollisionGroup, now stime.Time) ([]entity.Entity, []entity.Entity) {
// Reset the resolved slice
phase.resolved = phase.resolved[:0]
phase.solved = phase.solved[:0]

// Generate a collision index for the collision group
phase.collisionIndex = cg.CollisionIndex()
Expand Down Expand Up @@ -214,7 +214,7 @@ func (phase *narrowPhase) resolveActorActorCollision(a, b *actor, collision quad
// When this functions returns the
// collision will have been solved
defer func() {
phase.resolved = append(phase.resolved, collision)
phase.solved = append(phase.solved, collision)
}()

var entities []entity.Entity
Expand Down

0 comments on commit dcf53c8

Please sign in to comment.