fix: prevent race in forceDeath
This commit is contained in:
parent
114832c795
commit
fbbe8b00d1
|
@ -104,6 +104,9 @@ export class Alive extends decorate(Trait) {
|
|||
},
|
||||
|
||||
forceDeath: () => {
|
||||
if (this._isDying) {
|
||||
return;
|
||||
}
|
||||
this._isDying = true;
|
||||
this.entity.emit('dying');
|
||||
this._deathActions.once('actionsFinished', () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user