'c_setminmax(ENTITY*)' sets BBOX depending on all animation frames, so if BBOX is huge big, that means that in some of the animation frames, model moves far from it's origin.
So here you need to set custom BBOX. Or (if you don't use them) find animation frames that moves too far from the model's origin, and delete them. But I prefer the first solution.
Here is the example:
my.eflags |= FAT | NARROW; // set both flags
wait(1); // wait one frame
vec_set(my.min_x,vector(-50,-50,-50)); // set bounding box to individual values
vec_set(my.max_x,vector(50,50,50));
Call this before the while loop. Good luck.