Bugfixes for previous commit.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2497 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
dab73791c3
commit
9f11f50f4f
@ -463,7 +463,7 @@ void RaceGUI::drawPowerupIcons ( Kart* player_kart, int offset_x,
|
|||||||
void RaceGUI::drawEnergyMeter ( Kart *player_kart, int offset_x, int offset_y,
|
void RaceGUI::drawEnergyMeter ( Kart *player_kart, int offset_x, int offset_y,
|
||||||
float ratio_x, float ratio_y )
|
float ratio_x, float ratio_y )
|
||||||
{
|
{
|
||||||
float state = (float)(player_kart->getEnergy()) /
|
float state = (float)(player_kart->getNumItems()) /
|
||||||
MAX_ITEMS_COLLECTED;
|
MAX_ITEMS_COLLECTED;
|
||||||
int x = (int)((user_config->m_width-24) * ratio_x) + offset_x;
|
int x = (int)((user_config->m_width-24) * ratio_x) + offset_x;
|
||||||
int y = (int)(250 * ratio_y) + offset_y;
|
int y = (int)(250 * ratio_y) + offset_y;
|
||||||
|
@ -565,15 +565,6 @@ void Kart::update(float dt)
|
|||||||
// track again)
|
// track again)
|
||||||
if (material->isReset() && isOnGround()) forceRescue();
|
if (material->isReset() && isOnGround()) forceRescue();
|
||||||
else if(material->isZipper() && isOnGround()) handleZipper();
|
else if(material->isZipper() && isOnGround()) handleZipper();
|
||||||
else if(user_config->m_skidding) // set friction otherwise if it's enabled
|
|
||||||
{
|
|
||||||
for(int i=0; i<m_vehicle->getNumWheels(); i++)
|
|
||||||
{
|
|
||||||
// terrain dependent friction
|
|
||||||
m_vehicle->getWheelInfo(i).m_frictionSlip =
|
|
||||||
getFrictionSlip() * material->getFriction();
|
|
||||||
} // for i<getNumWheels
|
|
||||||
} // neither reset nor zipper material
|
|
||||||
} // if there is material
|
} // if there is material
|
||||||
|
|
||||||
// Check if any item was hit.
|
// Check if any item was hit.
|
||||||
|
@ -144,17 +144,8 @@ void RaceManager::setNumPlayers(int num)
|
|||||||
* \param diff Difficulty.
|
* \param diff Difficulty.
|
||||||
*/
|
*/
|
||||||
void RaceManager::setDifficulty(Difficulty diff)
|
void RaceManager::setDifficulty(Difficulty diff)
|
||||||
{
|
|
||||||
if(diff==RD_SKIDDING)
|
|
||||||
{
|
|
||||||
m_difficulty = RD_HARD;
|
|
||||||
user_config->m_skidding = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_difficulty = diff;
|
m_difficulty = diff;
|
||||||
user_config->m_skidding = false;
|
|
||||||
}
|
|
||||||
} // setDifficulty
|
} // setDifficulty
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user