Minor cosmetic changes.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13535 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-08-22 00:00:40 +00:00
parent 92667d4bba
commit 35b58661e5

View File

@ -966,9 +966,9 @@ bool Kart::isNearGround() const
*/
void Kart::setShieldTime(float t)
{
if(this->isShielded())
if(isShielded())
{
this->getAttachment()->setTimeLeft(t);
getAttachment()->setTimeLeft(t);
}
}
// ------------------------------------------------------------------------
@ -981,7 +981,8 @@ bool Kart::isShielded() const
return getAttachment()->getType() == Attachment::ATTACH_BUBBLEGUM_SHIELD;
else
return false;
}
} // isShielded
// ------------------------------------------------------------------------
/**
*Returns the remaining time the kart is protected by a shield.
@ -992,7 +993,8 @@ float Kart::getShieldTime() const
return getAttachment()->getTimeLeft();
else
return 0.0f;
}
} // getShieldTime
// ------------------------------------------------------------------------
/**
* Decreases the kart's shield time.
@ -1000,7 +1002,7 @@ float Kart::getShieldTime() const
*/
void Kart::decreaseShieldTime(float t)
{
if(this->isShielded())
if(isShielded())
{
getAttachment()->setTimeLeft( getAttachment()->getTimeLeft() - t );
if(t == 0.0f)
@ -1013,13 +1015,10 @@ void Kart::decreaseShieldTime(float t)
//Let the kart drop a bubble gum, if the shield was not damaged.
//This is the default, whenever a powerup is used by a kart.
//It is turned off, if the shield was reduced below zero by a hit. (Or by intently damaging the shield.)
if(!this->isShielded())
if(!isShielded())
m_bubble_drop = false;
}
} // decreaseShieldTime
//-----------------------------------------------------------------------------
/** Shows the star effect for a certain time.