Making townsfolk report you to a guard

This commit is contained in:
2014-06-19 18:59:12 -07:00
parent e31f32286f
commit 02fd77d960

View File

@@ -1083,7 +1083,8 @@ var AISprite = function(game, x, y, key, frame) {
} }
this.target = spr; this.target = spr;
} }
this.chasetarget(spr); if ( this.target !== null )
this.chasetarget(this.target);
} }
this.action_huntplayer = function() this.action_huntplayer = function()
@@ -1192,7 +1193,7 @@ var AISprite = function(game, x, y, key, frame) {
pathfinder_grid = []; pathfinder_grid = [];
this.walkables = []; this.walkables = [];
this.path = []; this.path = [];
this.target = player; this.target = null;
this.path_tweens = []; this.path_tweens = [];
this.path_maximum_steps = 4; this.path_maximum_steps = 4;
this.awareness_change_enabled = true; this.awareness_change_enabled = true;