diff --git a/src/actor.rs b/src/actor.rs index 44390f9..42b3895 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -281,13 +281,15 @@ pub fn update_power( prefs: Res, mut q_battery: Query<(&mut Battery, &mut Engine), With>, mut q_flashlight: Query<&mut Visibility, With>, + q_bike: Query<&PlayerDrivesThis>, mut ew_sfx: EventWriter, mut ew_game: EventWriter, ) { let mut power_down = false; let d = time.delta_seconds(); + let inside_vehicle = !q_bike.is_empty(); for (mut battery, mut engine) in &mut q_battery { - if !settings.god_mode { + if !inside_vehicle && !settings.god_mode { if settings.flashlight_active { battery.power -= POWER_DRAIN_FLASHLIGHT[prefs.flashlight_power] * d; // 2.4MW if battery.power <= 0.0 {