diff --git a/carball/analysis/events/hit_detection/hit_analysis.py b/carball/analysis/events/hit_detection/hit_analysis.py index 718855ad..17ad5ce3 100644 --- a/carball/analysis/events/hit_detection/hit_analysis.py +++ b/carball/analysis/events/hit_detection/hit_analysis.py @@ -151,8 +151,8 @@ def get_clear(data_frame: pd.DataFrame, saltie_hit: Hit, next_saltie_hit: Hit, if next_saltie_hit is not None: # check edge case where an own goal moves the ball to the middle - goals_at_hit = data_frame.game.iloc[saltie_hit.frame_number].goal_number - goals_at_next_hit = data_frame.game.iloc[next_saltie_hit.frame_number].goal_number + goals_at_hit = data_frame.game.loc[saltie_hit.frame_number].goal_number + goals_at_next_hit = data_frame.game.loc[next_saltie_hit.frame_number].goal_number if goals_at_hit != goals_at_next_hit: # lol they own-goaled return