Prevent negative time in network soccer when finishing
This commit is contained in:
parent
6423925718
commit
1d7a9e9465
@ -472,6 +472,9 @@ bool SoccerWorld::isRaceOver()
|
||||
*/
|
||||
void SoccerWorld::countdownReachedZero()
|
||||
{
|
||||
// Prevent negative time in network soccer when finishing
|
||||
m_time_ticks = 0;
|
||||
m_time = 0.0f;
|
||||
m_count_down_reached_zero = true;
|
||||
} // countdownReachedZero
|
||||
|
||||
|
@ -452,7 +452,7 @@ void WorldStatus::updateTime(int ticks)
|
||||
m_count_up_ticks++;
|
||||
}
|
||||
|
||||
if(m_time_ticks <= 0.0)
|
||||
if (m_time_ticks <= 0)
|
||||
{
|
||||
// event
|
||||
countdownReachedZero();
|
||||
|
Loading…
x
Reference in New Issue
Block a user