summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-05-20 01:11:19 -0400
committerKristian Høgsberg <krh@dinky.bitplanet.net>2006-05-20 01:11:19 -0400
commitde1df294bc699a797290ca4e84318f8c7315eb3b (patch)
tree6c0a778127759ea8359d3dcd032b4f2e4d964685
parent7994974a56facddcf197742ea691d00e1e457375 (diff)
Fix rope model initialization, tweak some settings.
-rw-r--r--akamaru.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/akamaru.c b/akamaru.c
index f7fc368..58d9e5d 100644
--- a/akamaru.c
+++ b/akamaru.c
@@ -114,7 +114,7 @@ model_init_rope (Model *model)
{
const int num_objects = 20;
const int num_sticks = num_objects - 1;
- const int stick_length = 20;
+ const int stick_length = 5;
int i;
model->objects = g_new (Object, num_objects);
@@ -122,7 +122,7 @@ model_init_rope (Model *model)
model->sticks = g_new (Stick, num_sticks);
model->num_sticks = num_sticks;
model->offsets = NULL;
- model->num_objects = 0;
+ model->num_offsets = 0;
for (i = 0; i < num_objects; i++) {
model->objects[i].position.x = 200;
@@ -209,7 +209,7 @@ model_accumulate_forces (Model *model)
for (i = 0; i < model->num_objects; i++) {
model->objects[i].force.x = 0;
- model->objects[i].force.y = 3;
+ model->objects[i].force.y = 0;
}
}
@@ -333,7 +333,7 @@ model_step (Model *model, double delta_t)
model_accumulate_forces (model);
model_integrate (model, delta_t);
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 20; i++)
model_constrain (model, delta_t);
model->theta += delta_t;