Skip to content

Commit

Permalink
Milliseconds Everywhere
Browse files Browse the repository at this point in the history
Signed-off-by: Fouks0 <42526046+Fouks0@users.noreply.github.com>
  • Loading branch information
Fouks0 committed Oct 18, 2019
1 parent 79ad454 commit 36188a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/race/race_manager.hpp
Expand Up @@ -762,10 +762,7 @@ class RaceManager
/** \brief Returns the number of second's decimals to display */
int currentModeTimePrecision() const
{
if (isEggHuntMode() || isTimeTrialMode())
return 3;//display milliseconds

return 2;//display centiseconds
return 3;//display milliseconds
} // currentModeTimePrecision
// ------------------------------------------------------------------------
/** \brief Returns true if the current mode has laps. */
Expand Down
4 changes: 2 additions & 2 deletions src/states_screens/race_gui.cpp
Expand Up @@ -73,7 +73,7 @@ RaceGUI::RaceGUI()
// Determine maximum length of the rank/lap text, in order to
// align those texts properly on the right side of the viewport.
gui::ScalableFont* font = GUIEngine::getHighresDigitFont();
core::dimension2du area = font->getDimension(L"99:99.99");
core::dimension2du area = font->getDimension(L"99:99.999");
m_timer_width = area.Width;
m_font_height = area.Height;

Expand Down Expand Up @@ -383,7 +383,7 @@ void RaceGUI::drawGlobalTimer()

bool use_digit_font = true;

float elapsed_time = World::getWorld()->getTime();
float elapsed_time = stk_config->ticks2Time(World::getWorld()->getTimeTicks());
if (!race_manager->hasTimeTarget() ||
race_manager ->getMinorMode()==RaceManager::MINOR_MODE_SOCCER ||
race_manager->getMinorMode() == RaceManager::MINOR_MODE_FREE_FOR_ALL ||
Expand Down
2 changes: 1 addition & 1 deletion src/utils/string_utils.hpp
Expand Up @@ -50,7 +50,7 @@ namespace StringUtils

bool notEmpty(const irr::core::stringw& input);
std::string ticksTimeToString(int time);
std::string timeToString(float time, unsigned int precision=2,
std::string timeToString(float time, unsigned int precision=3,
bool display_minutes_if_zero = true, bool display_hours = false);
irr::core::stringw loadingDots(float interval = 0.5f, int max_dots = 3);
irr::core::stringw loadingDots(const wchar_t *s);
Expand Down

0 comments on commit 36188a2

Please sign in to comment.