diff options
author | weiss <weiss@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-19 14:16:43 +0000 |
---|---|---|
committer | weiss <weiss@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-19 14:16:43 +0000 |
commit | d55a4543b406c29e0a18cfd15082a3ddc06bf77c (patch) | |
tree | 17fbc1fc398b49a63076665b950b0823daf67f32 /src/physics.c | |
parent | 23705de21cacd60e0dabe53a73454bcd28f8afad (diff) |
Make the recharge ripple fade nicely
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@144 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src/physics.c')
-rw-r--r-- | src/physics.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/physics.c b/src/physics.c index ad2dae6..4575b88 100644 --- a/src/physics.c +++ b/src/physics.c @@ -316,6 +316,7 @@ static void physics_process(ModelInstance *obj, Uint32 dt, Game *game) { obj->recharging = 1; game->platform_rel_x = coll.obj->x - obj->x; game->platform_rel_y = coll.obj->y - obj->y; + game->time_of_landing_event = game->tlast + sttc; } } else { @@ -357,7 +358,10 @@ void physics_step(Game *game, Uint32 t) { game->lander->vz += THRUST * dt; game->fuel -= 0.0002; game->lander->landed = 0; - game->lander->recharging = 0; + if ( game->lander->recharging ) { + game->time_of_landing_event = game->tlast + dt; + game->lander->recharging = 0; + } } } if ( game->forward && !game->lander->landed ) { |