diff options
-rw-r--r-- | xd.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4083,7 +4083,7 @@ static void GravityDemo(void) gravobj[0].y = mouse_y; } - for(f = 1; f < GRAV_OBJ; f++) + for(f = 0; f < GRAV_OBJ; f++) { if (gravobj[f].alive) { @@ -4112,6 +4112,8 @@ static void GravityDemo(void) dx /= d; dy /= d; + g /= gravobj[f].mass; + dx *= g; dy *= g; |