File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,11 @@ export default class LivingEntity extends ObjectEntity {
111111 this . healthData . health = 0 ;
112112
113113 let killer : ObjectEntity = source ;
114- while ( killer . relationsData . values . owner instanceof ObjectEntity && killer . relationsData . values . owner . hash !== 0 ) {
114+ while ( ObjectEntity . isObject ( killer . relationsData . values . owner ) && killer . relationsData . values . owner . hash !== 0 ) {
115115 killer = killer . relationsData . values . owner ;
116116 }
117117
118- if ( killer instanceof LivingEntity ) {
118+ if ( LivingEntity . isLive ( killer ) ) {
119119 this . onDeath ( killer ) ;
120120 }
121121
@@ -136,7 +136,7 @@ export default class LivingEntity extends ObjectEntity {
136136 if ( this . healthData . values . health <= 0 ) {
137137 this . destroy ( true ) ;
138138
139- this . damagedEntities = [ ] ;
139+ this . damagedEntities . length = 0 ;
140140 return ;
141141 }
142142
@@ -154,7 +154,7 @@ export default class LivingEntity extends ObjectEntity {
154154 this . healthData . health = this . healthData . values . maxHealth ;
155155 }
156156
157- this . damagedEntities = [ ] ;
157+ this . damagedEntities . length = 0 ;
158158 }
159159
160160 public tick ( tick : number ) {
You can’t perform that action at this time.
0 commit comments