From de5bad8702ec622d70fb26b780892880e96d203c Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 14 Feb 2015 21:48:47 +0100 Subject: [PATCH] code cleanup --- bin/www.js | 4 ++-- modules/renders.js | 7 +++---- routes/capes.js | 3 ++- routes/renders.js | 3 ++- server.js | 1 - 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/www.js b/bin/www.js index 323b4ef..ffefdf9 100644 --- a/bin/www.js +++ b/bin/www.js @@ -10,8 +10,8 @@ if (cluster.isMaster) { cluster.fork(); } - cluster.on("exit", function (worker, code, signal) { - logging.error("Worker died. Rebooting a new one."); + cluster.on("exit", function (worker) { + logging.error("Worker #" + worker.id + " died. Rebooting a new one."); setTimeout(cluster.fork, 100); }); diff --git a/modules/renders.js b/modules/renders.js index 4f1776e..c5ca3c4 100644 --- a/modules/renders.js +++ b/modules/renders.js @@ -2,7 +2,6 @@ // https://github.com/confuser/serverless-mc-skin-viewer // Permission to use & distribute https://github.com/confuser/serverless-mc-skin-viewer/blob/master/LICENSE -var helpers = require("./helpers"); var logging = require("./logging"); var fs = require("fs"); var Canvas = require("canvas"); @@ -43,7 +42,7 @@ exp.draw_head = function(skin_canvas, model_ctx, scale) { // using the skin from the +model_ctx+ at the +scale+ // parts are labeled as if drawn from the skin's POV exp.draw_body = function(rid, skin_canvas, model_ctx, scale) { - if (skin_canvas.height == 32 * scale) { + if (skin_canvas.height === 32 * scale) { logging.debug(rid + "uses old skin format"); //Left Leg //Left Leg - Front @@ -189,8 +188,8 @@ function scale_image(imageData, context, d_x, d_y, scale) { var width = imageData.width; var height = imageData.height; context.clearRect(0,0,width,height); //Clear the spot where it originated from - for(y=0; y