don't force entities to despawn when they die, the client figures out when to do that itself, fix #156

This commit is contained in:
Romain Beaumont 2015-12-11 01:14:39 +01:00
parent 8776a2baa7
commit 6207010a02

View file

@ -68,13 +68,8 @@ module.exports.entity=function(entity,serv)
entityId: entity.id,
entityStatus: 3
});
if(entity.type!="player") {
if(entity.type!="player")
delete serv.entities[entity.id];
setTimeout(() => {
entity.nearbyPlayers().forEach(otherPlayer => otherPlayer.despawnEntities([entity]));
},2000);
// this is the duration of the despawning animation, it should change for every entity (see EnderDragon)
}
}
else if (animation)
entity._writeOthers('animation',{