BSD build warning little fixes, implicit cast.

This commit is contained in:
David CARLIER 2022-05-22 11:20:38 +01:00
parent e666e08f2d
commit 096b408b9c

View File

@ -2138,7 +2138,7 @@ void SkiddingAI::handleRaceStart()
// smaller depending on the difficulty.
m_start_delay = stk_config->time2Ticks(
m_ai_properties->m_min_start_delay
+ (float) rand() / RAND_MAX
+ (float) rand() / (float) RAND_MAX
* (m_ai_properties->m_max_start_delay -
m_ai_properties->m_min_start_delay) );
@ -2147,7 +2147,7 @@ void SkiddingAI::handleRaceStart()
? 0.0f : m_ai_properties->m_false_start_probability;
// Now check for a false start. If so, add 1 second penalty time.
if (rand() < RAND_MAX * false_start_probability)
if (rand() < (float) RAND_MAX * false_start_probability)
{
m_start_delay+=stk_config->m_penalty_ticks;
return;