Avoid triggering other goal lines when the goal is already scored (#4802)

This commit is contained in:
Denis Kim 2022-10-31 06:38:05 +03:00 committed by GitHub
parent 538e03c514
commit 0546c1c91a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -487,6 +487,8 @@ void SoccerWorld::onCheckGoalTriggered(bool first_goal)
NetworkConfig::get()->isClient()))
return;
if (getTicksSinceStart() < m_ticks_back_to_own_goal)
return;
m_ticks_back_to_own_goal = getTicksSinceStart() +
stk_config->time2Ticks(3.0f);
m_goal_sound->play();