mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevent time until next battlemode change from being displayed as negative
This commit is contained in:
parent
100568f955
commit
77d6492dbf
@ -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(¬ice);
|
||||
|
||||
if next > 0.0 {
|
||||
let notice = format!(" Next change will be available in: {:.0} seconds", next);
|
||||
msg.push_str(¬ice);
|
||||
}
|
||||
}
|
||||
server.notify_client(
|
||||
client,
|
||||
|
Loading…
Reference in New Issue
Block a user