[WIP] Add physics calculations for vehicles. Not actually used anywhere yet.

ack, fixed.

On Tue, Dec 30, 2014 at 2:13 AM, Kevin Granade <notifications@github.com>
wrote:

> In src/veh_physics.cpp
> <https://github.com/CleverRaven/Cataclysm-DDA/pull/10666#discussion-diff-22335803>
> :
>
> > @@ -0,0 +1,191 @@
> > +#include "veh_physics.h"
> > +#include "game.h"
> > +#include "vehicle.h"
> > +#include "translations.h"
> > +
> > +double veh_physics::calculate_acceleration( double target_speed, bool max_power )
> > +{
> > +    engine_watt_avail = double(veh->power_to_epower(eng_pwr_cur));
> > +    if( max_power ) {
> > +        engine_watt_avail = double(veh->power_to_epower(eng_pwr_max));
> > +    }
> > +    if( engine_watt_avail < 1 ) {
> > +        return 0.0;
> > +    }
> > +    double total_time = 0.0, tile_time;
>
> one variable declaration per line please, and initialize variables to
> something sensible.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/CleverRaven/Cataclysm-DDA/pull/10666/files#r22335803>.
>



-- 

 - Vidar