Soccer: Fix two "other_team" conditional expressions

In two conditional expression, the value returned (assigned to "other_team") is the same for both branches.
This commit is contained in:
Saverio Miroddi 2022-06-06 01:03:33 +02:00
parent 6b2c17488b
commit ee805138da

View File

@ -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