summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xd.c b/xd.c
index ed6b6a9..e17461f 100644
--- a/xd.c
+++ b/xd.c
@@ -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;