diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -218,11 +218,11 @@ void frame_num_struct_builder(int sframe // matches your computer up with a lovely frame to render int frame_finder(){ - int your_frame = null; // your_frame is an interger value that will be given to the client as the frame number to render + int your_frame = 0; // your_frame is an interger value that will be given to the client as the frame number to render int finder_jobnum = 0; int frameset_count = 0; // the frameset number, note* frames in an animation don't start at zero short int done = 0; - int priority = 10; + short int priority = 10; while(priority >= 1){ // start the scan for the next job with the highest priority finder_jobnum = hcfjob + 1; // reset it to start scanning at first uncompleted job for the pass at each priority level @@ -252,11 +252,11 @@ int frame_finder(){ frameset_count++; // If frame is assigned or done, it goes to next frame } -blendjob[jobnum].frameset[x].frame_status++; // sets the value of the frame to 2, which means its taken +blendjob[jobnum].frameset[frameset_count].frame_status++; // sets the value of the frame to 2, which means its taken -your_frame = blendjob[jobnum].frameset[x].frame_num; // Takes the frameset found in the while statement above, and extracts the frame number from it and assigns it to the int your_frame +your_frame = blendjob[jobnum].frameset[frameset_count].frame_num; // Takes the frameset found in the while statement above, and extracts the frame number from it and assigns it to the int your_frame -if(your_frame == null) // If that job had no open frames for some reason, run the status report generator so that +if(your_frame == 0) // If that job had no open frames for some reason, run the status report generator so that status_report_generator(); //the job priority can be changed to 0 return your_frame; // your_frame is returned as the frame to be rendered @@ -266,24 +266,24 @@ return your_frame; // your_frame is retu // This uses pointers, so when it is run it updates certain values in memory void status_report_generator(){ - while(blendjob[(hcfjob+1)].priority = 0) //If the job after the highest consecutively finished job is finished + while(blendjob[(hcfjob+1)].priority == 0) //If the job after the highest consecutively finished job is finished hcfjob++; // adds 1 to the highest consecutively finished job and checks the next one, till the job after the hcfjob is not done int num1 = hcfjob+1; // to scan through jobs int num2 = 0; // to scan through frames while(num1 <= highest_jobnum){ - if(blendjob[num1].frameset[num2].priority != 0){ // If the job is not done, scan it + if(blendjob[num1].priority != 0){ // If the job is not done, scan it float finished_frames = 0; // variable that counts the completed frames int pending_frames = 0; // variable that counts the assigned frames float percent = 0; // variable that stores the percent done of the blendjob while(num2 <= blendjob[jobnum].total_frames){ // If - if(blendjob[jobnum].frameset[num2].frame_status = 2) + if(blendjob[jobnum].frameset[num2].frame_status == 2) finished_frames++; - if(blendjob[jobnum].frameset[num2].frame_status = 1) + if(blendjob[jobnum].frameset[num2].frame_status == 1) pending_frames++; num2++;