diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -57,6 +57,12 @@ struct { int total_frames; // how many frames are in the animation struct frameset **frameset; // What exactly is this now? hehe + + + // For secondary upload location... + char url; + char login_name; + char login_pass; } blendjob[max]; // -- Matthew's handywork -- @@ -65,11 +71,6 @@ struct { int frame_num; // frame number to render char slave_name; // user that frame is assigned to int frame_status; // status of frame, 0= unassigned, 1= taken, 2= done - - // For secondary upload location... - char url; - char login_name; - char login_pass; } frameset[frame_count]; // Frame count is the frame number if the animation starts on zero... but animations start at frame 1 // Using this method to save memory, because if animation starts on a high frame number, it would waste a lot of RAM on empty structures // -- end of Matthew's handywork -- @@ -338,13 +339,20 @@ void status_report_generator(){ hcfjob+1; // adds 1 to the highest consecutively finished job while(num1 <= highest_jobnum){ - if(blendjob[num1].frameset[num2].priority != 0){ + if(blendjob[num1].frameset[num2].priority != 0){ // If the job is not done, scan it + + int finished_frames = 0; // variable that counts the completed frames while(num2 <= blendjob[jobnum].total_frames){ - int finished_frames = 0; if(blendjob[jobnum].frameset[num2]) finished_frames++; + + num2++; } } + + blendjob[num1].completed_frames = finished_frames; + + num1++; } }