[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdegames/kolf
From:       Jason Katz-Brown <jason () katzbrown ! com>
Date:       2003-06-23 5:39:44
[Download RAW message or body]

CVS commit by katz: 

fix the two most long-standing bugs in kolf.. cause i'm such a ditz and haven't \
gotten around to it before.

If anybody wants to help me merge my stuff in the development branch to HEAD in two \
weeks after i return from Japan, I'd appreciate it. 

Cheers!


  M +5 -5      game.cpp   1.161.2.1
  M +7 -1      slope.cpp   1.5.2.1


--- kdegames/kolf/game.cpp  #1.161:1.161.2.1
@@ -2793,12 +2793,12 @@ void KolfGame::timeout()
                         if ((*it).score(curHole) < holeInfo.maxStrokes() - 1 || \
!holeInfo.hasMaxStrokes())  {
-                                shotDone();
                                 loadStateList();
                                 
                                 // increment curPlayer; he did take a shot, after \
                all
-                                (*curPlayer).addStrokeToHole(curHole);
-                                emit scoreChanged((*curPlayer).id(), curHole, \
(*curPlayer).score(curHole)); +                                // 5-23, oops, no, he \
gets incremented in shotDone(). +                                \
//(*curPlayer).addStrokeToHole(curHole); +                                //emit \
scoreChanged((*curPlayer).id(), curHole, (*curPlayer).score(curHole));  }
-                        else
+
                                 shotDone();
 

--- kdegames/kolf/slope.cpp  #1.5:1.5.2.1
@@ -329,4 +329,10 @@ bool Slope::collision(Ball *ball, long i
 
         ball->setVelocity(vx, vy);
+
+        // check if the ball is at the center of a pit or mound
+        // or has otherwise stopped.
+        if (vx == 0 && vy ==0)
+                ball->setState(Stopped);
+        else
         ball->setState(Rolling);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic