summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhistory.txt1
-rw-r--r--objects.js5
2 files changed, 4 insertions, 2 deletions
diff --git a/history.txt b/history.txt
index 53e6087..da0aebf 100755
--- a/history.txt
+++ b/history.txt
@@ -2154,3 +2154,4 @@ ______
------
* Objects: stop replacing the empty string with the number zero in watchers
* Threads: initialize new variables with zero (instead of null)
+* Objects: fixed #465
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();