From: Steinar H. Gunderson Date: Mon, 1 May 2023 17:26:36 +0000 (+0200) Subject: Drops and throwaways take us into defense. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b9905507ed31cce8acbdcdb3c1125053ec047e38;p=pkanalytics Drops and throwaways take us into defense. --- diff --git a/events.cpp b/events.cpp index 13ebfc0..09c8567 100644 --- a/events.cpp +++ b/events.cpp @@ -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;