Skip to content

Commit 6355580

Browse files
committed
Merge pull request liamrahav#1 from chase4926/patch-1
Removed confusing and unnecessary code - Sounds good to me, thanks for catching that :)
2 parents cfe1707 + 7adc523 commit 6355580

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

intermediate/collision.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ def step(self, dt):
7272
new_rect.y += dy * dt
7373

7474
# Now we need to actually check for collisions
75-
# This line is going to seem rather odd as it has two equals signs in it
76-
dx, dy = self.target.velocity = self.collide_map(map_layer, last_rect, new_rect, dy, dx)
77-
# But what it essentially does is run the collide_map function from RectMapCollider to figure out new dx and dy values
75+
self.target.velocity = self.collide_map(map_layer, last_rect, new_rect, dy, dx)
76+
# What this line does is run the collide_map function from RectMapCollider to figure out new dx and dy values
7877
# Then it sets the target's velocity equal to those new dx and dy values
79-
# And lastly is sets the local dx and dy values to the new velocity
8078

8179
# Here we check if it is on the ground by looking at the previous bounding rect's y and the current one's y
8280
# If they're both the same, we know that the target has not moved off the ground!

0 commit comments

Comments
 (0)