mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-04 22:43:17 +08:00
Update kingofthehill.py
This commit is contained in:
parent
b57d3c5b3e
commit
38204f7dac
@ -239,11 +239,16 @@ class KingOfTheHillGame(ba.TeamGameActivity[Player, Team]):
|
|||||||
|
|
||||||
def _handle_player_flag_region_collide(self, colliding: bool) -> None:
|
def _handle_player_flag_region_collide(self, colliding: bool) -> 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 spaz.is_alive():
|
||||||
|
return
|
||||||
|
|
||||||
|
player = spaz.getplayer(Player, True)
|
||||||
|
|
||||||
# Different parts of us can collide so a single value isn't enough
|
# Different parts of us can collide so a single value isn't enough
|
||||||
# also don't count it if we're dead (flying heads shouldn't be able to
|
# also don't count it if we're dead (flying heads shouldn't be able to
|
||||||
# win the game :-)
|
# win the game :-)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user