despawn chat on death

This commit is contained in:
yuni 2024-04-05 05:10:03 +02:00
parent 28212c6316
commit 634482fb73

View file

@ -101,11 +101,14 @@ pub fn handle_new_conversations(
}
// no existing chats yet, let's create a new one
commands.spawn(Chat {
id: id.to_string(),
label: label.to_string(),
timer: time.elapsed_seconds_f64(),
});
commands.spawn((
Chat {
id: id.to_string(),
label: label.to_string(),
timer: time.elapsed_seconds_f64(),
},
world::DespawnOnPlayerDeath,
));
break;
}
}