Merge branch 'qrazhan/573-dont-announce-alias-no-body' into 'master'

Closes #573. Do not announce alias change for non-body players.

Closes #573

See merge request veloren/veloren!1025
This commit is contained in:
Songtronix 2020-05-31 06:31:37 +00:00
commit b9c1042833

View File

@ -358,12 +358,16 @@ fn handle_alias(
player.alias.clone(),
));
server.state.notify_registered_clients(msg);
server
.state
.notify_registered_clients(ServerMsg::broadcast(format!(
"{} is now known as {}.",
old_alias, player.alias
)));
// Announce alias change if target has a Body.
if ecs.read_storage::<comp::Body>().get(target).is_some() {
server
.state
.notify_registered_clients(ServerMsg::broadcast(format!(
"{} is now known as {}.",
old_alias, player.alias
)));
}
}
} else {
server.notify_client(