@@ -438,7 +438,7 @@ module.exports = { | |||||
this.obj.spellbook.die(); | this.obj.spellbook.die(); | ||||
obj.destroyed = true; | obj.destroyed = true; | ||||
obj.destroyedBy = 'death'; | |||||
obj.destructionEvent = 'death'; | |||||
let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']); | ||||
if (deathAnimation) { | if (deathAnimation) { | ||||
@@ -70,7 +70,7 @@ module.exports = { | |||||
sync = { | sync = { | ||||
id: o.id, | id: o.id, | ||||
destroyed: true, | destroyed: true, | ||||
destroyedBy: o.destroyedBy | |||||
destructionEvent: o.destructionEvent | |||||
}; | }; | ||||
objects.removeObject(o); | objects.removeObject(o); | ||||
@@ -113,8 +113,14 @@ module.exports = { | |||||
} | } | ||||
if (destroyed || !canSee) { | if (destroyed || !canSee) { | ||||
if (!canSee) | |||||
queueFunction({ id: oId, destroyed: true }, [ p.serverId ]); | |||||
if (!canSee) { | |||||
queueFunction({ | |||||
id: oId, | |||||
destroyed: true, | |||||
destructionEvent: 'visibility' | |||||
}, | |||||
[ p.serverId ]); | |||||
} | |||||
p.player.unsee(oId); | p.player.unsee(oId); | ||||
} | } | ||||