summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-26 23:09:34 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-26 23:10:05 (EDT)
commit2bac5f3298af1c09576cfaaa2b3bcce019d04e91 (patch)
tree9cdb960dd2386d178900069d36d94ee724aee120 /src
parent0710b7ace924b691e95eca41924be4acae7a015e (diff)
downloaddodge-balls-2bac5f3298af1c09576cfaaa2b3bcce019d04e91.zip
dodge-balls-2bac5f3298af1c09576cfaaa2b3bcce019d04e91.tar.gz
dodge-balls-2bac5f3298af1c09576cfaaa2b3bcce019d04e91.tar.bz2
ball: Initialize other ball in collision loop
Diffstat (limited to 'src')
-rw-r--r--src/ball.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ball.c b/src/ball.c
index 1386cfd..2a2c721 100644
--- a/src/ball.c
+++ b/src/ball.c
@@ -100,7 +100,7 @@ db_balls_collisions(struct db_ball *ball)
int col_x;
int col_y;
- for (; other != NULL; other = other->next) {
+ for (other = ball->next; other != NULL; other = other->next) {
if (db_col_pt_cir_cir(ball->x, ball->y, ball->r,
other->x, other->y, other->r,
&col_x, &col_y)) {