]> git.sesse.net Git - pkanalytics/commitdiff
Drops and throwaways take us into defense.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 May 2023 17:26:36 +0000 (19:26 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 May 2023 17:26:36 +0000 (19:26 +0200)
events.cpp

index 13ebfc04fc7fe57be94aee9c2967b1892200bc17..09c8567ddf8c30737d0d1f578c8f46f108864997 100644 (file)
@@ -258,6 +258,10 @@ EventsModel::Status EventsModel::get_status_at(uint64_t t)
                        s.offense = true;
                        last_gained_possession = e.t;
                }
+               if (e.type == "drop" || e.type == "throwaway") {
+                       s.offense = false;
+                       num_touches = 0;
+               }
        }
        s.num_passes = (num_touches == 0) ? 0 : num_touches - 1;
        s.possession_sec = (s.offense && last_gained_possession != 0) ? (t - last_gained_possession) / 1000 : 0;