This commit is contained in:
Janek
2024-04-10 22:35:40 +02:00
parent 63867593ef
commit 120b30f5c7
3 changed files with 25 additions and 10 deletions

View File

@@ -81,6 +81,18 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
}
};
let bomb_defuse_left: f32 = {
if bomb_can_defuse {
if let Some(bomb_stamp) = data.bomb_planted_stamp {
data.bomb_defuse_length - defuse_stamp.elapsed().as_secs_f32()
} else {
0.0
}
} else {
0.0
}
};
last_bomb_dropped = data.bomb_dropped;
last_bomb_planted = data.bomb_planted;
@@ -204,7 +216,8 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
bomb_defuse_timeleft,
data.bomb_exploded,
data.bomb_being_defused,
data.bomb_defuse_length
data.bomb_defuse_length,
bomb_defuse_left
);
} else {
let mut radar = radar_data.write().await;