mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 01:13:13 +08:00
Merge pull request #654 from 3alTemp/meteor-fix
Meteor Shower minigame end fix
This commit is contained in:
commit
51a9f39d0d
@ -51,5 +51,8 @@
|
||||
### Rikko
|
||||
- Created the original "reject_recently_left_players" plugin
|
||||
|
||||
### Temp (3alTemp)
|
||||
- Modder & Bug Fixer
|
||||
|
||||
### brostos
|
||||
- Added support for joining using ipv6 address
|
||||
|
||||
@ -73,6 +73,7 @@ class MeteorShowerGame(bs.TeamGameActivity[Player, Team]):
|
||||
self._last_player_death_time: float | None = None
|
||||
self._meteor_time = 2.0
|
||||
self._timer: OnScreenTimer | None = None
|
||||
self._ended: bool = False
|
||||
|
||||
# Some base class overrides:
|
||||
self.default_music = (
|
||||
@ -161,6 +162,10 @@ class MeteorShowerGame(bs.TeamGameActivity[Player, Team]):
|
||||
return None
|
||||
|
||||
def _check_end_game(self) -> None:
|
||||
# We don't want to end this activity more than once.
|
||||
if self._ended:
|
||||
return
|
||||
|
||||
living_team_count = 0
|
||||
for team in self.teams:
|
||||
for player in team.players:
|
||||
@ -270,4 +275,5 @@ class MeteorShowerGame(bs.TeamGameActivity[Player, Team]):
|
||||
# Submit the score value in milliseconds.
|
||||
results.set_team_score(team, int(1000.0 * longest_life))
|
||||
|
||||
self._ended = True
|
||||
self.end(results=results)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user