Fixed divided by 0 error
This commit is contained in:
parent
c8d46a02b7
commit
2a80cb78b5
@ -106,9 +106,21 @@ fn sort_by_total_score(
|
||||
.enumerate()
|
||||
.collect();
|
||||
|
||||
let lifesaver_best = lifesaver_best.get();
|
||||
let popduiken_best = popduiken_best.get();
|
||||
let hindernis_best = hindernis_best.get();
|
||||
let mut lifesaver_best = lifesaver_best.get();
|
||||
let mut popduiken_best = popduiken_best.get();
|
||||
let mut hindernis_best = hindernis_best.get();
|
||||
|
||||
if lifesaver_best == 0 {
|
||||
lifesaver_best = 10 * 60 * 1000;
|
||||
}
|
||||
|
||||
if popduiken_best == 0 {
|
||||
popduiken_best = 10 * 60 * 1000;
|
||||
}
|
||||
|
||||
if hindernis_best == 0 {
|
||||
hindernis_best = 10 * 60 * 1000;
|
||||
}
|
||||
|
||||
all_participants.sort_by(|(_, a), (_, b)| {
|
||||
let part_a = match a.value.get().events {
|
||||
|
@ -9,7 +9,7 @@ pub fn init_websocket() {
|
||||
ready_state,
|
||||
message,
|
||||
..
|
||||
} = use_websocket("ws://192.168.100.122:3000/ws");
|
||||
} = use_websocket("ws://192.168.0.150:3000/ws");
|
||||
|
||||
provide_context(ready_state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user