diff --git a/src/hud.rs b/src/hud.rs index 3ba840a..aea4e69 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -426,13 +426,17 @@ fn update_hud( _ => false }} }; - let logs_vec: Vec = log.logs.iter() + let mut logs_vec: Vec = log.logs.iter() .filter(logfilter) .map(|s| if s.sender.is_empty() { format!("{}", s.text) } else { format!("{}: {}", s.sender, s.text) - }).collect(); + }) + .rev() + .take(3) + .collect(); + logs_vec.reverse(); chat.sections[0].value = logs_vec.join("\n"); } log.needs_rerendering = false;