Note that with precise that the instance could collide with the bbox of an object but then not actually collide with the object in precise when moving forward. You could keep checking to see if the instance moves past the object without colliding then do a further bbox check beyond that; however it's probably not common enough a scenario for that to be efficient.
Looking at your code I'm also confused what this part is doing in there:
I don't think it should be there at all.
Looking at your code I'm also confused what this part is doing in there:
Code Select
double current_dist = DMIN;
{
double next_x = x + mid_dist*cos_angle;
double next_y = y - mid_dist*sin_angle;
if (collide_inst_inst(object, solid_only, true, next_x, next_y) == NULL) {
inst1->x = next_x;
inst1->y = next_y;
current_dist = mid_dist;
}
}I don't think it should be there at all.

It seems to be the way with these functions.