Browse Source

bug: Fixed lighting efects crashing in some cases

tags/v0.12.0.9^2
Shaun 11 months ago
parent
commit
3227f3a91a
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/server/clientComponents/lightningEffect.js

+ 6
- 0
src/server/clientComponents/lightningEffect.js View File

@@ -25,6 +25,12 @@ define([
init: function () {
effects.register(this);

if (this.toX === undefined && this.target === undefined) {
this.destroyed = true;

return;
}

let { toX = this.target.x, toY = this.target.y } = this;

const fromX = this.obj.x + ((toX >= this.obj.x) ? 1 : 0);


Loading…
Cancel
Save