2
0
Эх сурвалжийг харах

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
jomo 4 жил өмнө
parent
commit
265a98d404
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      lib/helpers.js

+ 2 - 2
lib/helpers.js

@@ -324,7 +324,7 @@ function get_type(overlay, body) {
 }
 }
 
 
 // handles creations of 3D renders
 // 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_render = function(rid, userId, scale, overlay, body, callback) {
   exp.get_skin(rid, userId, function(err, skin_hash, status, img, slim) {
   exp.get_skin(rid, userId, function(err, skin_hash, status, img, slim) {
     if (!skin_hash) {
     if (!skin_hash) {
@@ -350,7 +350,7 @@ exp.get_render = function(rid, userId, scale, overlay, body, callback) {
             callback(null, 0, skin_hash, null);
             callback(null, 0, skin_hash, null);
           } else {
           } else {
             fs.writeFile(renderpath, drawn_img, "binary", function(write_err) {
             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);
             });
             });
           }
           }
         });
         });