From c7a6dcb197ca36aa5df2610c451c7d59f1078810 Mon Sep 17 00:00:00 2001 From: taw27 Date: Sat, 17 May 2008 23:37:29 +0000 Subject: Fuel and radiation meter functionality git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@26 84d2e878-0bd5-11dd-ad15-13eda11d74c5 --- src/physics.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/physics.c') diff --git a/src/physics.c b/src/physics.c index 9fa77da..76ddf7d 100644 --- a/src/physics.c +++ b/src/physics.c @@ -97,7 +97,10 @@ void physics_step(Game *game, Uint32 t) { /* Handle things specific to the lander craft */ if ( game->thrusting ) { - game->lander->vz += THRUST * dt; + if ( game->fuel > 0.0 ) { + game->lander->vz += THRUST * dt; + game->fuel -= 0.0002; + } } if ( game->forward ) { game->lander->vx += sinf(game->lander->yaw) * FTHRUST * dt; @@ -134,8 +137,6 @@ void physics_step(Game *game, Uint32 t) { } - //game->view_angle = deg2rad(30.0 - 30.0 * game->lander->vz/0.015); - game->tlast = t; } -- cgit v1.2.3