Skip to content

Commit

Permalink
Divider for generated power should be float (cataclysmbnteam#3408)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vollch authored Oct 10, 2023
1 parent e964764 commit 2a46a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4636,11 +4636,11 @@ void vehicle::consume_fuel( int load, const int t_seconds, bool skip_electric )
if( g->u.has_active_bionic( bid ) ) { // active power gen
// more pedaling = more power
g->u.mod_power_level( units::from_kilojoule( muscle.fuel_energy() ) * bid->fuel_efficiency *
( load / 1000 ) );
( load / 1000.0f ) );
mod += eff_load / 5;
} else { // passive power gen
g->u.mod_power_level( units::from_kilojoule( muscle.fuel_energy() ) * bid->passive_fuel_efficiency *
( load / 1000 ) );
( load / 1000.0f ) );
mod += eff_load / 10;
}
}
Expand Down

0 comments on commit 2a46a92

Please sign in to comment.