Adjust the speed and power values
This commit is contained in:
parent
5bfb1a2c6b
commit
1317714ba1
@ -75,7 +75,7 @@
|
||||
pressed, the harder the kart will brake.
|
||||
max-speed-reverse-ratio is the percentage of max speed for reverse gear.
|
||||
-->
|
||||
<engine power="875" max-speed="25" brake-factor="11.0"
|
||||
<engine power="875" max-speed="25" brake-factor="15"
|
||||
brake-time-increase="6" max-speed-reverse-ratio="0.3" />
|
||||
|
||||
<!-- Simulated gears
|
||||
@ -326,7 +326,7 @@
|
||||
<turn turn-radius="0:3.0 10:10.0 25:20.0 45:40.0"
|
||||
time-full-steer ="0:0.15 0.5:0.15 0.5:0.25 1.0:0.25"
|
||||
time-reset-steer="0.1" />
|
||||
<engine power="*0.45" max-speed="*0.8" brake-factor="0.8"
|
||||
<engine power="*0.5" max-speed="*0.8" brake-factor="*1"
|
||||
max-speed-reverse-ratio="0.5" />
|
||||
<gear switch-ratio="0.20 0.55 1" power-increase="5 4 3" />
|
||||
<mass value="195" />
|
||||
@ -344,7 +344,7 @@
|
||||
<turn turn-radius="0:4.5 10:16.0 25:30.0 45:60.0"
|
||||
time-full-steer ="0:0.17 0.5:0.17 0.5:0.28 1.0:0.28"
|
||||
time-reset-steer="0.1" />
|
||||
<engine power="*0.6" max-speed="*0.9" brake-factor="*0.9" />
|
||||
<engine power="*0.7" max-speed="*0.9" brake-factor="*0.9" />
|
||||
<gear switch-ratio="0.30 0.7 1.0" power-increase="2.2 2.2 2.5" />
|
||||
<mass value="250" />
|
||||
<startup time="0.3 0.5"
|
||||
@ -359,7 +359,7 @@
|
||||
<turn turn-radius="0:4.0 10:18.5 25:43.0 45:72.5"
|
||||
time-full-steer ="0:0.23 0.5:0.23 0.5:0.41 1.0:0.41"
|
||||
time-reset-steer="0.1" />
|
||||
<engine power="*1" max-speed="*1" brake-factor="*1"
|
||||
<engine power="*1" max-speed="*1" brake-factor="*0.8"
|
||||
max-speed-reverse-ratio="0.65" />
|
||||
<gear switch-ratio="0.45 0.70 1" power-increase="1.5 1.7 2.5" />
|
||||
<mass value="350" />
|
||||
|
@ -79,15 +79,18 @@ KartStatsWidget::KartStatsWidget(core::recti area, const int player_id,
|
||||
m_children.push_back(skill_bar);
|
||||
}
|
||||
|
||||
m_skills[SKILL_MASS]->setValue((int)(props->getCombinedCharacteristic()->getMass() / 5));
|
||||
// Scale the values so they look better
|
||||
m_skills[SKILL_MASS]->setValue((int)
|
||||
((kp->getCombinedCharacteristic()->getMass() - 20) / 4));
|
||||
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_SPEED]->setValue((int)((props->getCombinedCharacteristic()->getEngineMaxSpeed() - 20) * 9));
|
||||
m_skills[SKILL_SPEED]->setValue((int)
|
||||
((kp->getCombinedCharacteristic()->getEngineMaxSpeed() - 15) * 6));
|
||||
m_skills[SKILL_SPEED]->setLabel(_("SPEED"));
|
||||
m_skills[SKILL_SPEED]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_speed", m_player_id);
|
||||
|
||||
m_skills[SKILL_POWER]->setValue((int)(props->getAvgPower()));
|
||||
m_skills[SKILL_POWER]->setValue((int) ((kp->getAvgPower() - 30) / 20));
|
||||
m_skills[SKILL_POWER]->setLabel(_("POWER"));
|
||||
m_skills[SKILL_POWER]->m_properties[PROP_ID] = StringUtils::insertValues("@p%i_power", m_player_id);
|
||||
|
||||
|
@ -554,9 +554,9 @@ float KartProperties::getAvgPower() const
|
||||
{
|
||||
float sum = 0;
|
||||
std::vector<float> gear_power_increase = m_combined_characteristic->getGearPowerIncrease();
|
||||
float max_speed = m_combined_characteristic->getEngineMaxSpeed();
|
||||
float power = m_combined_characteristic->getEnginePower();
|
||||
for (unsigned int i = 0; i < gear_power_increase.size(); ++i)
|
||||
sum += gear_power_increase[i] * max_speed;
|
||||
sum += gear_power_increase[i] * power;
|
||||
return sum / gear_power_increase.size();
|
||||
} // getAvgPower
|
||||
|
||||
|
@ -811,11 +811,13 @@ void KartSelectionScreen::updateKartStats(uint8_t widget_id,
|
||||
kart_properties_manager->getKart(selection);
|
||||
if (kp != NULL)
|
||||
{
|
||||
// Scale the values so they look better
|
||||
w->setValue(KartStatsWidget::SKILL_MASS, (int)
|
||||
(kp->getCombinedCharacteristic()->getMass() / 5));
|
||||
((kp->getCombinedCharacteristic()->getMass() - 20) / 4));
|
||||
w->setValue(KartStatsWidget::SKILL_SPEED, (int)
|
||||
((kp->getCombinedCharacteristic()->getEngineMaxSpeed() - 20) * 9));
|
||||
w->setValue(KartStatsWidget::SKILL_POWER, (int) kp->getAvgPower());
|
||||
((kp->getCombinedCharacteristic()->getEngineMaxSpeed() - 15) * 6));
|
||||
w->setValue(KartStatsWidget::SKILL_POWER, (int)
|
||||
((kp->getAvgPower() - 30) / 20));
|
||||
w->update(0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user