Skip to content

Commit

Permalink
Fix the tails speeding up or stopping movement when they are longer t…
Browse files Browse the repository at this point in the history
…han the fretboard.
  • Loading branch information
mdsitton committed Jul 27, 2011
1 parent 4ecfe16 commit 1543f72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Instrument.py
Expand Up @@ -1691,8 +1691,12 @@ def project(beat):

glEnable(GL_TEXTURE_2D)

movement1 = (project((offset * self.tailSpeed) * self.beatsPerUnit)*3)
movement2 = (project(((offset * self.tailSpeed) + s) * self.beatsPerUnit)*3)
if length >= self.boardLength:
movement1 = (project((offset * self.tailSpeed) * self.beatsPerUnit)*3) - (project(offset * self.beatsPerUnit)*3)
movement2 = (project(((offset * self.tailSpeed) + s) * self.beatsPerUnit)*3) - (project(offset * self.beatsPerUnit)*3)
else:
movement1 = (project((offset * self.tailSpeed) * self.beatsPerUnit)*3)
movement2 = (project(((offset * self.tailSpeed) + s) * self.beatsPerUnit)*3)

self.tail_tex[0][1] = self.tail_tex[1][1] = movement1
self.tail_tex[2][1] = self.tail_tex[3][1] = movement2
Expand Down

0 comments on commit 1543f72

Please sign in to comment.