[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegames/kolf
From: Stefan Majewsky <majewsky () gmx ! net>
Date: 2010-10-31 22:15:44
Message-ID: 20101031221544.30A24AC8E7 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1191688 by majewsky:
Remove unused ball animation code.
M +0 -26 ball.cpp
M +0 -5 ball.h
--- trunk/KDE/kdegames/kolf/ball.cpp #1191687:1191688
@@ -35,7 +35,6 @@
m_doDetect = true;
m_collisionLock = false;
setBeginningOfHole(false);
- setBlowUp(false);
collisionId = 0;
m_addStroke = false;
m_placeOnGround = false;
@@ -70,31 +69,6 @@
setBeginningOfHole(false);
}
-void Ball::advance(int /*phase*/)
-{
- // not used anymore
- // can be used to make ball wobble
- /*if (phase == 1 && m_blowUp)
- {
- if (blowUpCount >= 50)
- {
- // i should make this a config option
- //setAddStroke(addStroke() + 1);
- setBlowUp(false);
- resetSize();
- return;
- }
-
- const double diff = 8;
- double randnum = KRandom::random();
- const double width = 6 + randnum * (diff / RAND_MAX);
- randnum = KRandom::random();
- const double height = 6 + randnum * (diff / RAND_MAX);
- setRect(rect().x(), rect().y(), width, height);
- blowUpCount++;
- }*/
-}
-
void Ball::friction()
{
if (state == Stopped || state == Holed || !isVisible())
--- trunk/KDE/kdegames/kolf/ball.h #1191687:1191688
@@ -36,7 +36,6 @@
BallState currentState();
- virtual void advance(int phase);
virtual void doAdvance();
virtual void moveBy(double dx, double dy);
virtual void setVelocity(const Vector& velocity);
@@ -53,8 +52,6 @@
void setMoved(bool yes) { m_moved = yes; }
bool moved() const { return m_moved; }
- void setBlowUp(bool yes) { m_blowUp = yes; blowUpCount = 0; }
- bool blowUp() const { return m_blowUp; }
void setFrictionMultiplier(double news) { frictionMultiplier = news; }
void friction();
@@ -108,8 +105,6 @@
//the maximum speed of the ball after hitting a bumper, this will decrease ith each \
bounce so that the ball does not bounce against bumpers forever double \
maxBumperBounceSpeed;
- bool m_blowUp;
- int blowUpCount;
int m_addStroke;
bool m_placeOnGround;
double m_oldvx;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic