Fixed skill bars to return correct values. Also minor fix in kart properties
This commit is contained in:
parent
c3e862f40c
commit
000fa2cf73
@ -575,7 +575,7 @@
|
|||||||
time-full-steer ="0:0.15 0.5:0.15 0.5:0.25 1.0:0.25"
|
time-full-steer ="0:0.15 0.5:0.15 0.5:0.25 1.0:0.25"
|
||||||
time-reset-steer="0.1"/>
|
time-reset-steer="0.1"/>
|
||||||
|
|
||||||
<engine power="250 300 350 400" max-speed="15 20 23 25" brake-factor="15.0"
|
<engine power="250 300 350 400" max-speed="15.8 18.8 23.85 30.0" brake-factor="15.0"
|
||||||
max-speed-reverse-ratio="0.3"/>
|
max-speed-reverse-ratio="0.3"/>
|
||||||
|
|
||||||
<gear switch-ratio="0.20 0.55 1" power-increase="5 4 3"/>
|
<gear switch-ratio="0.20 0.55 1" power-increase="5 4 3"/>
|
||||||
@ -677,7 +677,7 @@
|
|||||||
time-full-steer ="0:0.23 0.5:0.23 0.5:0.41 1.0:0.41"
|
time-full-steer ="0:0.23 0.5:0.23 0.5:0.41 1.0:0.41"
|
||||||
time-reset-steer="0.1"/>
|
time-reset-steer="0.1"/>
|
||||||
|
|
||||||
<engine power="600 700 800 900" max-speed="15.8 18.8 23.85 30.0" brake-factor="10"
|
<engine power="600 700 800 900" max-speed="15 20 23 25" brake-factor="10"
|
||||||
max-speed-reverse-ratio="0.65"/>
|
max-speed-reverse-ratio="0.65"/>
|
||||||
|
|
||||||
<gear switch-ratio="0.45 0.70 1" power-increase="1.5 1.7 2.5"/>
|
<gear switch-ratio="0.45 0.70 1" power-increase="1.5 1.7 2.5"/>
|
||||||
|
@ -91,16 +91,16 @@ KartStatsWidget::KartStatsWidget(core::recti area, const int player_id,
|
|||||||
m_children.push_back(skill_bar);
|
m_children.push_back(skill_bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_skills[SKILL_MASS]->setValue(props->getMass()/10);
|
m_skills[SKILL_MASS]->setValue((int)(props->getMass()/5));
|
||||||
m_skills[SKILL_MASS]->setLabel("WEIGHT");
|
m_skills[SKILL_MASS]->setLabel("WEIGHT");
|
||||||
m_skills[SKILL_MASS]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_mass", m_player_id);
|
m_skills[SKILL_MASS]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_mass", m_player_id);
|
||||||
|
|
||||||
m_skills[SKILL_ACCEL]->setValue(props->getTrackConnectionAccel()/10);
|
m_skills[SKILL_ACCEL]->setValue((int)((props->getMaxSpeed()-20)*20));
|
||||||
m_skills[SKILL_ACCEL]->setLabel("ACCEL");
|
m_skills[SKILL_ACCEL]->setLabel("ACCEL");
|
||||||
m_skills[SKILL_ACCEL]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_accel", m_player_id);
|
m_skills[SKILL_ACCEL]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_accel", m_player_id);
|
||||||
|
|
||||||
m_skills[SKILL_SPEED]->setValue(props->getMaxSpeed()/10);
|
m_skills[SKILL_SPEED]->setValue((int)(props->getMaxPower()/10));
|
||||||
m_skills[SKILL_SPEED]->setLabel("SPEED");
|
m_skills[SKILL_SPEED]->setLabel("POWER");
|
||||||
m_skills[SKILL_SPEED]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_speed", m_player_id);
|
m_skills[SKILL_SPEED]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_speed", m_player_id);
|
||||||
|
|
||||||
} // KartStatsWidget
|
} // KartStatsWidget
|
||||||
|
@ -1526,9 +1526,9 @@ void KartSelectionScreen::updateKartStats(uint8_t widget_id,
|
|||||||
kart_properties_manager->getKart(selection);
|
kart_properties_manager->getKart(selection);
|
||||||
if (kp != NULL)
|
if (kp != NULL)
|
||||||
{
|
{
|
||||||
w->setValue(KartStatsWidget::SKILL_MASS, (int)kp->getMass()/10);
|
w->setValue(KartStatsWidget::SKILL_MASS, (int)(kp->getMass()/5));
|
||||||
w->setValue(KartStatsWidget::SKILL_SPEED, (int)kp->getMaxSpeed()/10);
|
w->setValue(KartStatsWidget::SKILL_SPEED, (int)(kp->getMaxPower()/10));
|
||||||
w->setValue(KartStatsWidget::SKILL_ACCEL, (int)kp->getTrackConnectionAccel()/10);
|
w->setValue(KartStatsWidget::SKILL_ACCEL, (int)((kp->getMaxSpeed()-20)*20));
|
||||||
w->update(0);
|
w->update(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user