# HG changeset patch # User Binki # Date 2009-07-15 11:13:16 # Node ID d246f9d7e4fb1681642ccfe6419c880a610611eb # Parent c6e0422d180eec4ebed5eefcc5a42a36d48fc18d fixed frame numbering in frame_num_struct_builder() diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -239,20 +239,20 @@ void status_report_generator(struct blen // **** Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer. -void frame_num_struct_builder(struct blendjob *job, unsigned int numframes) { +void frame_num_struct_builder(struct blendjob *job, unsigned int startframe, unsigned int numframes) { int jobnum_new = highest_jobnum + 1; /* global vars will someday leave us */ - int counter; + unsigned int counter; job->frameset = malloc(sizeof(struct frameset) * numframes); if(!job->frameset) fprintf(stderr, "error allocating memory"); - job->total_frames = total; // sets the total number of frames in animation for status purposes + job->total_frames = numframes; // sets the total number of frames in animation for status purposes job->jobnum = jobnum_new; - for(counter = 0; counter < total; counter ++) + for(counter = 0; counter < numframes; counter ++) /* This builds the array, with the array starting at zero and the frame_num starting at sframe */ - job->frameset[counter].frame_num = counter + 1; + job->frameset[counter].frame_num = counter + startframe; highest_jobnum++; // After it has created the job, it adds one to the highest_jobnum interger }