From 265a98d404609a65025694627c2424f54f2eff68 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 13 Jul 2020 00:41:21 +0200 Subject: [PATCH] pass on caching status information foor 3D renders this was falsely always set to 2, indicating the skin was downloaded, even when it was cached --- lib/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index 42965c3..e2e8633 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -324,7 +324,7 @@ function get_type(overlay, body) { } // handles creations of 3D renders -// callback: error, skin hash, image buffer +// callback: error, status, skin hash, image buffer exp.get_render = function(rid, userId, scale, overlay, body, callback) { exp.get_skin(rid, userId, function(err, skin_hash, status, img, slim) { if (!skin_hash) { @@ -350,7 +350,7 @@ exp.get_render = function(rid, userId, scale, overlay, body, callback) { callback(null, 0, skin_hash, null); } else { fs.writeFile(renderpath, drawn_img, "binary", function(write_err) { - callback(write_err, 2, skin_hash, drawn_img); + callback(write_err, status, skin_hash, drawn_img); }); } });