Add positional sounds from the tilemap

This commit is contained in:
2014-06-13 23:42:47 -07:00
parent bcccbeb2db
commit 7b0fc07844

View File

@@ -130,8 +130,8 @@ SoundSprite.prototype.adjust_relative_to = function(spr) {
} else {
var hyp = Math.sqrt((xd * xd) + (yd * yd));
var hyp_perfect = Math.sqrt(
((game.camera.width/2) * (game.camera.width/2)) +
((game.camera.height/2) * (game.camera.height/2))
Number((game.camera.width/2) * (game.camera.width/2)) +
Number((game.camera.height/2) * (game.camera.height/2))
);
}