From ccdce5da74cbc0b8bd1f60c8981894bc1f0e164b Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 5 Jun 2014 17:42:36 +0200 Subject: fixed #465 --- objects.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'objects.js') diff --git a/objects.js b/objects.js index e3f1674..41f3e4a 100644 --- a/objects.js +++ b/objects.js @@ -3204,11 +3204,12 @@ SpriteMorph.prototype.forward = function (steps) { SpriteMorph.prototype.setHeading = function (degrees) { var x = this.xPosition(), y = this.yPosition(), - turn = degrees - this.heading; + dir = (+degrees || 90), + turn = dir - this.heading; // apply to myself this.changed(); - SpriteMorph.uber.setHeading.call(this, degrees); + SpriteMorph.uber.setHeading.call(this, dir); this.silentGotoXY(x, y, true); // just me this.positionTalkBubble(); -- cgit v1.3.1