Prevent time until next battlemode change from being displayed as negative

This commit is contained in:
Keegan-JW 2024-01-21 13:35:09 +00:00 committed by Illia Denysenko
parent 100568f955
commit 77d6492dbf

View File

@ -4009,8 +4009,11 @@ fn handle_battlemode(
let Time(change) = change;
let elapsed = time - change;
let next = COOLDOWN - elapsed;
let notice = format!(" Next change will be available in: {:.0} seconds", next);
msg.push_str(&notice);
if next > 0.0 {
let notice = format!(" Next change will be available in: {:.0} seconds", next);
msg.push_str(&notice);
}
}
server.notify_client(
client,