]> git.sesse.net Git - pkanalytics/commitdiff
Do not backdate substitutions to before the match start.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 May 2023 22:19:40 +0000 (00:19 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 May 2023 22:19:40 +0000 (00:19 +0200)
events.cpp

index e7db8f41353f3b226c22602afe13fe5cda8a8326..e6ed5796340ff3521ab051512f25920d1d04c022 100644 (file)
@@ -361,7 +361,7 @@ void EventsModel::set_team_at(uint64_t t, const set<int> &new_team)
                if (e.t > t) {
                        break;
                }
-               if (e.type == "goal" || e.type == "their_goal" || e.type == "stoppage" || e.type == "reset") {
+               if (e.type == "goal" || e.type == "their_goal" || e.type == "stoppage" || e.type == "reset" || e.type == "set_offense" || e.type == "set_defense") {
                        backdate_point = e.t + 1;
                }
                if (e.player_id.has_value() && !new_team.count(*e.player_id)) {