Avoid triggering other goal lines when the goal is already scored (#4802)
This commit is contained in:
parent
538e03c514
commit
0546c1c91a
@ -487,6 +487,8 @@ void SoccerWorld::onCheckGoalTriggered(bool first_goal)
|
|||||||
NetworkConfig::get()->isClient()))
|
NetworkConfig::get()->isClient()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (getTicksSinceStart() < m_ticks_back_to_own_goal)
|
||||||
|
return;
|
||||||
m_ticks_back_to_own_goal = getTicksSinceStart() +
|
m_ticks_back_to_own_goal = getTicksSinceStart() +
|
||||||
stk_config->time2Ticks(3.0f);
|
stk_config->time2Ticks(3.0f);
|
||||||
m_goal_sound->play();
|
m_goal_sound->play();
|
||||||
|
Loading…
Reference in New Issue
Block a user