소스 검색

Indicate if objects were destroyed by death or by visibility

tags/v0.11.0
kckckc 2 년 전
부모
커밋
a338a5129e
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -0
      src/server/components/stats.js
  2. +4
    -2
      src/server/world/syncer.js

+ 2
- 0
src/server/components/stats.js 파일 보기

@@ -436,7 +436,9 @@ module.exports = {
obj.effects.die();
if (this.obj.spellbook)
this.obj.spellbook.die();

obj.destroyed = true;
obj.destroyedBy = 'death';

let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']);
if (deathAnimation) {


+ 4
- 2
src/server/world/syncer.js 파일 보기

@@ -59,7 +59,8 @@ module.exports = {
continue;

let destroyed = o.destroyed;
let destroyedBy = o.destroyedBy;

let sync = null;
let syncSelf = null;
if (!destroyed) {
@@ -69,7 +70,8 @@ module.exports = {
} else {
sync = {
id: o.id,
destroyed: true
destroyed: true,
destroyedBy
};

objects.removeObject(o);


불러오는 중...
취소
저장