Bug in implementation of #35, failed to skip ourselves
This commit is contained in:
@@ -347,7 +347,7 @@ var AISprite = function(game, x, y, key, frame) {
|
|||||||
var aiSprites = game.state.states.game.aiSprites;
|
var aiSprites = game.state.states.game.aiSprites;
|
||||||
var hasBeenReset = false;
|
var hasBeenReset = false;
|
||||||
aiSprites.forEach(function(spr) {
|
aiSprites.forEach(function(spr) {
|
||||||
if ( hasBeenReset == true )
|
if ( hasBeenReset == true || spr == this)
|
||||||
return;
|
return;
|
||||||
if ( game.physics.arcade.overlap(spr, this) ) {
|
if ( game.physics.arcade.overlap(spr, this) ) {
|
||||||
var last = this.path[this.path.length - 1];
|
var last = this.path[this.path.length - 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user