Skip to content

Commit

Permalink
fix border snowballs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaNubCoding committed Nov 10, 2024
1 parent 55ab472 commit d594c7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ def update_position(self) -> None:
if self.pos.x > Border.x or self.pos.x < -Border.x:
if time.time() - self.self_snowball_time > 800 / diff * 0.06:
pos = self.pos - (0, 400) - self.scene.wind_vel * 0.25 + (self.vel.x * 0.4, 0) + (uniform(-80, 80), 0)
self.spawn_snowball(0, pos, VEC(0, 0))
sb = SelfSnowball(self.scene, VEC(0, 0), randint(0, 1), pos=pos, follow=False)
self.snowballs[sb.id] = sb
self.self_snowball_time = time.time()

self.can_move = self.frame_group != self.assets.player_dig and not self.digging
Expand Down

0 comments on commit d594c7d

Please sign in to comment.