mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix: don't show logout message when player never was ingame
This commit is contained in:
parent
a0d01c064c
commit
4501fef503
@ -1122,7 +1122,11 @@ impl Server {
|
||||
}
|
||||
|
||||
if disconnect {
|
||||
if let Some(player) = state.ecs().read_storage::<comp::Player>().get(entity) {
|
||||
if let (Some(player), Some(_)) = (
|
||||
state.ecs().read_storage::<comp::Player>().get(entity),
|
||||
// It only shows a message if you had a body (not in char selection)
|
||||
state.ecs().read_storage::<comp::Body>().get(entity),
|
||||
) {
|
||||
new_chat_msgs.push((
|
||||
None,
|
||||
ServerMsg::broadcast(format!("{} went offline.", &player.alias)),
|
||||
|
Loading…
Reference in New Issue
Block a user