diff options
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 ) { |