From 2a46a922452b881f6fcb99eb1a0b96163757420d Mon Sep 17 00:00:00 2001 From: Vollch Date: Tue, 10 Oct 2023 17:06:28 +0300 Subject: [PATCH] Divider for generated power should be float (#3408) --- src/vehicle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 504fdcb7a621..f1ed06a3db4c 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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; } }