summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-10-19 08:47:09 +0000
committerIan C <ianc@noddybox.co.uk>2018-10-19 08:47:09 +0000
commit35dae3cc1d3a76eeef18f625dda55a5e7fdfd079 (patch)
treec617c96448aaaab1afb33b0bba4239a8dfbc8894
parent3ccd572165cb06076b6c90cef219d2ea4bc9d44f (diff)
Small tweak to grav demo.
-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;