fix: Respawn dead player after exiting the game
Minimal fix for "undead" players (zero health) joining again after quitting from the death info screen.
@@ -178,7 +178,7 @@ private void restoreCharacter(EntityRef entity, EntityRef character) {
character.saveComponent(characterComp);
character.setOwner(entity);
if (!character.hasComponent(AliveCharacterComponent.class)) {
- character.addComponent(new AliveCharacterComponent());
+ respawnPlayer(entity);
}
Location.attachChild(character, entity, new Vector3f(), new Quat4f(0, 0, 0, 1));
} else {
