mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'UMR1352/fix#793' into 'master'
Fix #793: hide message for player coming online Closes #793 See merge request veloren/veloren!1443
This commit is contained in:
commit
ab411406b0
@ -269,8 +269,7 @@ impl StateExt for State {
|
|||||||
});
|
});
|
||||||
|
|
||||||
match &msg.chat_type {
|
match &msg.chat_type {
|
||||||
comp::ChatType::Online(_)
|
comp::ChatType::Offline(_)
|
||||||
| comp::ChatType::Offline(_)
|
|
||||||
| comp::ChatType::CommandInfo
|
| comp::ChatType::CommandInfo
|
||||||
| comp::ChatType::CommandError
|
| comp::ChatType::CommandError
|
||||||
| comp::ChatType::Loot
|
| comp::ChatType::Loot
|
||||||
@ -279,6 +278,18 @@ impl StateExt for State {
|
|||||||
| comp::ChatType::World(_) => {
|
| comp::ChatType::World(_) => {
|
||||||
self.notify_registered_clients(ServerGeneral::ChatMsg(resolved_msg))
|
self.notify_registered_clients(ServerGeneral::ChatMsg(resolved_msg))
|
||||||
},
|
},
|
||||||
|
comp::ChatType::Online(u) => {
|
||||||
|
for (client, uid) in (
|
||||||
|
&mut ecs.write_storage::<Client>(),
|
||||||
|
&ecs.read_storage::<Uid>(),
|
||||||
|
)
|
||||||
|
.join()
|
||||||
|
{
|
||||||
|
if uid != u {
|
||||||
|
client.send_msg(ServerGeneral::ChatMsg(resolved_msg.clone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
comp::ChatType::Tell(u, t) => {
|
comp::ChatType::Tell(u, t) => {
|
||||||
for (client, uid) in (
|
for (client, uid) in (
|
||||||
&mut ecs.write_storage::<Client>(),
|
&mut ecs.write_storage::<Client>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user