In Makaqu, I've got this little check to make sure that the particle metadata only gets recreated when actually needed:
Code: Select all
// doubled the minimum size here to make sure the particle will appear,
// since the width and height calculations reduces its drawing area
max_size = min (vid.width, vid.height) + 2;
// don't recalculate when only zooming in
if (r_particles_init
&& r_particles.h_aspect == h_aspect
&& r_particles.max_size == max_size
)
return;
So, I decided to print out the contents of the aspect variables, since they were the most likely to be malfunctioning:
Code: Select all
Con_DPrintf ("r_particles.h_aspect %d\n", r_particles.h_aspect);
Con_DPrintf ("h_aspect %d\n", h_aspect);
So, I removed the Con_DPrintf lines, and... the stuttering came back. I put the lines back in, and the stuttering was gone again. Then, I tried removing only the first Con_DPrintf line, and the stuttering was still gone. And finally, I put the first line back in and removed just the second line, and it was still gone. So, adding a Con_DPrintf line after the check made it so the check, which is run before the Con_DPrintf, don't fail. It makes no bloody sense at all .
Things like this can be embarrassing, but it was impossible to not laugh.