From ee805138dac56b8aa84a39dfc31816a11311b13a Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Mon, 6 Jun 2022 01:03:33 +0200 Subject: [PATCH] Soccer: Fix two "other_team" conditional expressions In two conditional expression, the value returned (assigned to "other_team") is the same for both branches. --- soccer-master/soccer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soccer-master/soccer.py b/soccer-master/soccer.py index c823f77..b03f7e1 100644 --- a/soccer-master/soccer.py +++ b/soccer-master/soccer.py @@ -571,7 +571,7 @@ class Player(MyActor): target.x = max(AI_MIN_X, min(AI_MAX_X, target.x)) target.y = max(AI_MIN_Y, min(AI_MAX_Y, target.y)) - other_team = 1 if self.team == 0 else 1 + other_team = 1 if self.team == 0 else 0 speed = LEAD_PLAYER_BASE_SPEED if game.teams[other_team].human(): speed += game.difficulty.speed_boost @@ -794,7 +794,7 @@ class Game: o = self.ball.owner pos, team = o.vpos, o.team owners_target_goal = game.goals[team] - other_team = 1 if team == 0 else 1 + other_team = 1 if team == 0 else 0 if self.difficulty.goalie_enabled: # Find the nearest opposing team player to the goal, and make them mark the goal