Got stress testing working again (and a few bug fixes)

This commit is contained in:
Eric Froemling 2020-05-06 23:43:14 -07:00
parent b69657a08e
commit 85b01c72cc
5 changed files with 16 additions and 21 deletions

View File

@ -4132,16 +4132,16 @@
"assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c",
"assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb",
"assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe",
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5a/39/65d7a21f427d1f8c9b4716363d77", "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/99/352d39206f7d69fe6994cf76630f",
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e3/07/dd3a30df3e60bcb19314b7c11f64", "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/5c/5d51f9311bea060aff1ba78badf2",
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ba/2e/986f46803c0a058dd3eace081150", "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/95/95/c3377070f58a64dbb0021a14c010",
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/60/f8/b1790f0b8142264a04bd3d9c9e08", "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/c2/9aa9ead87fe83ffc866b7eca2207",
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c0/f7/d8f95c83471c134f7cf5a058828c", "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/15/f8/91f9155b210027bf2c502ed92b5c",
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/60/49/570898c369fd388970bd086c0f76", "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ac/15/75f1062a7f6b72b5ef963a2b6526",
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c1/bf/43f1c52e319823ad6cea21a2c14c", "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b4/6f/6079d00d0b6e431112353487fdce",
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/52/90/4ad2ec0f1f81f87a6cc4971c5b8e", "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b2/c0/22f3df76593e0fbc468e5798dae9",
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ac/a0/24b940d7c28d09285bef72bd8ccb", "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/29/28/cc1a0ce82174ae0f4c006e6bb703",
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/19/09/616270667d7e2356e417afa68533", "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/56/64/e099012eb1cbe1db37b87b909933",
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/bb/39/090582c57d942ad0eaf93abcf692", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/55/3b/7774d86041fec2e13fa21576ced7",
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/9b/74/0720f21b36250917496d50893e6e" "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b1/db/7571aa0352b133e95a793f162a07"
} }

View File

@ -87,11 +87,10 @@ class MultiTeamScoreScreenActivity(ScoreScreenActivity):
is_free_for_all = isinstance(self.session, ba.FreeForAllSession) is_free_for_all = isinstance(self.session, ba.FreeForAllSession)
def _get_prec_score(p_rec: ba.PlayerRecord) -> int: def _get_prec_score(p_rec: ba.PlayerRecord) -> Optional[int]:
if is_free_for_all and results is not None: if is_free_for_all and results is not None:
assert isinstance(results, ba.TeamGameResults) assert isinstance(results, ba.TeamGameResults)
val = results.get_team_score(p_rec.team) val = results.get_team_score(p_rec.team)
assert val is not None
return val return val
return p_rec.accumscore return p_rec.accumscore

View File

@ -454,7 +454,6 @@ class Spaz(ba.Actor):
Called to 'press punch' on this spaz; Called to 'press punch' on this spaz;
used for player or AI connections. used for player or AI connections.
""" """
assert self.node
if not self.node or self.frozen or self.node.knockout > 0.0: if not self.node or self.frozen or self.node.knockout > 0.0:
return return
t_ms = ba.time(timeformat=ba.TimeFormat.MILLISECONDS) t_ms = ba.time(timeformat=ba.TimeFormat.MILLISECONDS)

View File

@ -46,9 +46,8 @@ class ConquestFlag(Flag):
self.light: Optional[ba.Node] = None self.light: Optional[ba.Node] = None
@property @property
def team(self) -> ba.Team: def team(self) -> Optional[ba.Team]:
"""The team that owns this flag.""" """The team that owns this flag."""
assert self._team is not None
return self._team return self._team
@team.setter @team.setter
@ -185,10 +184,8 @@ class ConquestGame(ba.TeamGameActivity):
for team in self.teams: for team in self.teams:
team.gamedata['flags_held'] = 0 team.gamedata['flags_held'] = 0
for flag in self._flags: for flag in self._flags:
try: if flag.team is not None:
flag.team.gamedata['flags_held'] += 1 flag.team.gamedata['flags_held'] += 1
except Exception:
pass
for team in self.teams: for team in self.teams:
# If a team finds themselves with no flags, cancel all # If a team finds themselves with no flags, cancel all

View File

@ -213,10 +213,10 @@ class RaceGame(ba.TeamGameActivity):
player = playernode.getdelegate().getplayer() player = playernode.getdelegate().getplayer()
except Exception: except Exception:
player = None player = None
assert isinstance(player, ba.Player)
region = region_node.getdelegate() region = region_node.getdelegate()
if not player or not region: if not player or not region:
return return
assert isinstance(player, ba.Player)
assert isinstance(region, RaceRegion) assert isinstance(region, RaceRegion)
last_region = player.gamedata['last_region'] last_region = player.gamedata['last_region']