Update assault.py

This commit is contained in:
Drooopyyy 2022-06-03 23:17:31 +05:30 committed by GitHub
parent e7f17cb84b
commit ea6d779559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,12 +175,16 @@ class AssaultGame(ba.TeamGameActivity[Player, Team]):
def _handle_base_collide(self, team: Team) -> None: def _handle_base_collide(self, team: Team) -> None:
try: try:
player = ba.getcollision().opposingnode.getdelegate( spaz = ba.getcollision().sourcenode.getdelegate(
PlayerSpaz, True).getplayer(Player, True) PlayerSpaz, True)
except ba.NotFoundError: except ba.NotFoundError:
return return
if not player.is_alive(): if not spaz.is_alive():
return
player = spaz.getplayer(Player, True)
if player is None:
return return
# If its another team's player, they scored. # If its another team's player, they scored.