diff options
author | Ian C <ianc@noddybox.co.uk> | 2018-10-19 08:47:09 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2018-10-19 08:47:09 +0000 |
commit | 35dae3cc1d3a76eeef18f625dda55a5e7fdfd079 (patch) | |
tree | c617c96448aaaab1afb33b0bba4239a8dfbc8894 /xd.c | |
parent | 3ccd572165cb06076b6c90cef219d2ea4bc9d44f (diff) |
Small tweak to grav demo.
Diffstat (limited to 'xd.c')
-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; |