Fixed the player being rendered after dying

This commit is contained in:
Capucho 2020-04-08 21:28:33 +01:00
parent 6353367577
commit b6078d832a

View File

@ -1435,6 +1435,13 @@ impl FigureMgr {
let character_state = character_state_storage.get(player_entity);
if let Some(body) = ecs.read_storage::<Body>().get(player_entity) {
let stats_storage = state.read_storage::<Stats>();
let stats = stats_storage.get(player_entity);
if stats.map_or(false, |s| s.is_dead) {
return;
}
let loadout_storage = ecs.read_storage::<Loadout>();
let loadout = loadout_storage.get(player_entity);