Fixing the sticky bomb chaos bug.

At last, fixed after 10 years.
This commit is contained in:
Vishal 2024-05-19 04:46:10 +05:30 committed by GitHub
parent 109f0660ad
commit 0b0eb22883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -243,9 +243,23 @@ class AssaultGame(bs.TeamGameActivity[Player, Team]):
)
bs.timer(0.5, light.delete)
bs.animate(light, 'intensity', {0: 0, 0.1: 1.0, 0.5: 0})
def teleport(
client: Player,
pos: Sequence[float],
num: float
) -> None:
if client.actor:
client.actor.handlemessage(
bs.StandMessage(pos,num)
)
if player.actor:
random_num = random.uniform(0, 360)
player.actor.handlemessage(
bs.StandMessage(new_pos, random.uniform(0, 360))
bs.StandMessage(new_pos, random_num)
)
bs.timer(
0.01,
bs.Call(teleport, player, new_pos, random_num)
)
# Have teammates celebrate.