entity should despawn even if animation=false

This commit is contained in:
Romain Beaumont 2015-11-29 20:35:58 +01:00
parent c34ebb1f5e
commit 64c1a5921d

View file

@ -47,11 +47,12 @@ module.exports.entity=function(entity,serv)
entity.sendVelocity(velocity.scaled(1/32), maxVelocity);
if(entity.health<=0 && animation) {
entity._writeOthers('entity_status', {
entityId: entity.id,
entityStatus: 3
});
if(entity.health<=0) {
if(animation)
entity._writeOthers('entity_status', {
entityId: entity.id,
entityStatus: 3
});
if(entity.type!="player") {
delete serv.entities[entity.id];
setTimeout(() => {