Hide player body after death

This commit is contained in:
timokoesters 2020-03-19 20:36:19 +01:00
parent 44d3f4c4ac
commit 26674390ab
2 changed files with 3 additions and 2 deletions

View File

@ -100,6 +100,7 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
entity,
assets::load_expect_cloned::<Item>("common.items.cheese"),
);
state.ecs().write_storage::<comp::Stats>().remove(entity);
state.ecs().write_storage::<comp::Agent>().remove(entity);
state
.ecs()

View File

@ -1364,8 +1364,8 @@ impl FigureMgr {
ecs.read_storage::<Scale>().maybe(),
)
.join()
// Don't render dead entities // Disabled to render corpses
//.filter(|(_, _, _, _, stats, loadout, _)| stats.map_or(true, |s| !s.is_dead))
// Don't render dead entities
.filter(|(_, _, _, _, stats, loadout, _)| stats.map_or(true, |s| !s.is_dead))
{
let is_player = entity == player_entity;
let player_camera_mode = if is_player {