mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-05 19:20:54 +00:00
entity should despawn even if animation=false
This commit is contained in:
parent
c34ebb1f5e
commit
64c1a5921d
1 changed files with 6 additions and 5 deletions
|
|
@ -47,11 +47,12 @@ module.exports.entity=function(entity,serv)
|
||||||
|
|
||||||
entity.sendVelocity(velocity.scaled(1/32), maxVelocity);
|
entity.sendVelocity(velocity.scaled(1/32), maxVelocity);
|
||||||
|
|
||||||
if(entity.health<=0 && animation) {
|
if(entity.health<=0) {
|
||||||
entity._writeOthers('entity_status', {
|
if(animation)
|
||||||
entityId: entity.id,
|
entity._writeOthers('entity_status', {
|
||||||
entityStatus: 3
|
entityId: entity.id,
|
||||||
});
|
entityStatus: 3
|
||||||
|
});
|
||||||
if(entity.type!="player") {
|
if(entity.type!="player") {
|
||||||
delete serv.entities[entity.id];
|
delete serv.entities[entity.id];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue